Gemini 4 Argon Added; DeepSeek Flash Upgraded
Date: 2026-10-18 / (1405-07-26)
Summary
Gemini 4 Argon is now available on AvalAI for long-horizon reasoning, coding, and multimodal work. The existing deepseek-flash and deepseek-v4.1-flash IDs now use DeepSeek-V4.1-Flash-1017, with no client-side code changes or pricing changes.
Details
Google: Gemini 4 Argon
Use the exact AvalAI model ID gemini-4-argon for Google's new flagship model. Google describes Argon as a frontier model built to sustain deep reasoning across complex, long-horizon workflows, including:
- Software engineering: repository-level debugging, code migrations, algorithm design, and iterative implementation with verification.
- Enterprise knowledge work: multi-step financial research, legal research and drafting, and analysis across extensive document collections.
- Multimodal understanding: professional chart analysis and understanding details in long videos, alongside text, image, audio, and PDF input supported in the AvalAI catalog.
- Defensive cybersecurity: authorized vulnerability analysis, validation, and remediation. Use scoped permissions, isolated environments, and human review before applying changes.
- Writing: creative writing and specialized professional drafting.
| AvalAI catalog field | Current value |
|---|---|
| Model ID | gemini-4-argon |
| Maximum input tokens | 1,048,576 |
| Maximum output tokens | 1,048,576 |
| Input modalities | Text, image, audio, video, PDF |
| Output | Text; not audio or image generation |
| Other capabilities | Reasoning, function calling, structured output, prompt caching, streaming |
Google describes the expanded output limit as 1M tokens, up from the previous 64K limit. The two catalog maxima are separate limits: do not add them together and assume a request can always consume both in full. Context accounting, reasoning, output budgets, account rate limits, and the selected API format still matter. Large output capacity is not a recommendation to request a million-token answer.
This release does not change gemini-flash-latest: it continues to point to gemini-3.8-flash. Select gemini-4-argon explicitly when you want Argon.
DeepSeek: automatic Flash base-model upgrade
Both existing AvalAI IDs now use the upgraded base model:
| Model ID to keep in requests | Base model after the upgrade | Required client action |
|---|---|---|
deepseek-flash | DeepSeek-V4.1-Flash-1017 | None |
deepseek-v4.1-flash | DeepSeek-V4.1-Flash-1017 | None |
No client-side code changes are necessary, and pricing is unchanged. Keep your current model ID, API key, endpoint, and request format. DeepSeek-V4.1-Flash-1017 identifies the underlying base model; it is not a new AvalAI API model ID to put in the model field.
This announcement covers only deepseek-flash and deepseek-v4.1-flash. It does not announce new redirects for deepseek-v4-flash or other DeepSeek compatibility aliases, new endpoint support, or new reasoning-effort values. Regression-test important prompts and tool workflows because a base-model upgrade can change generated answers even when integration code and token rates stay the same.
Selected Google-reported benchmarks
These are results reported by Google, not independently measured AvalAI results or guarantees for every application:
| Evaluation | Google-reported Argon result | Evaluated task |
|---|---|---|
| DeepSWE v1.1 | 77.9% | Long-horizon software engineering |
| AutomationBench | 51.3% | End-to-end business workflow execution |
| LVBench | 91.7% | Long-video understanding |
| CWE-bench v1 | 68%, tied for first | Security vulnerability remediation |
Google also reports leading results on the Vals Index, Vals Finance Agent v2, and Harvey's Legal Agent Benchmark. Benchmark scores depend on evaluation conditions and the surrounding agent setup; evaluate your own workloads before making production decisions.
Google describes a phased direct rollout, including trusted defenders in its Fairwind Program. That upstream access program is separate from the AvalAI routes announced here. It does not mean AvalAI users receive special defender access or disabled cybersecurity safeguards.
Argon endpoint availability
All four formats below support gemini-4-argon on AvalAI:
| API format | Route | Request shape |
|---|---|---|
| Native Gemini | https://api.avalai.ir/v1beta/models | contents and parts; invoke gemini-4-argon:generateContent |
| OpenAI-compatible Chat Completions | https://api.avalai.ir/v1/chat/completions | model and messages |
| Anthropic-compatible Messages | https://api.avalai.ir/v1/messages | model, messages, and max_tokens |
| OpenAI-compatible Responses | https://api.avalai.ir/v1/responses | model and input |
Endpoint availability does not imply support for every provider-hosted tool, beta feature, or stateful behavior. Check your exact tool loop, response schema, streaming behavior, and conversation-continuation requirements before switching API formats.
AvalAI pricing
All rates below are USD per 1 million tokens.
Gemini 4 Argon promotional and standard rates
| Pricing period | Input | Cached input | Output |
|---|---|---|---|
| Promotional, through November 30, 2026 inclusive — 2026-11-30 (1405-09-09) | $2.00 | $0.10 | $10.00 |
| Standard, from December 1, 2026 — 2026-12-01 (1405-09-10) | $4.00 | $0.20 | $20.00 |
Cached-input prices apply only to cache-hit tokens; other input uses the input rate. The promotion halves the standard token rates. Hidden reasoning is billed as output, and separately billed tools are not included in these token prices. Plan for the standard rates when budgeting workloads that continue after the promotion.
DeepSeek Flash rates remain unchanged
| AvalAI model ID | Input | Cached input | Output |
|---|---|---|---|
deepseek-flash | $0.15 | $0.003 | $0.60 |
deepseek-v4.1-flash | $0.15 | $0.003 | $0.60 |
AvalAI's fixed DeepSeek rates apply around the clock. No scheduling, peak-hour doubling, or further halving applies. The upgrade changes the base model, not these prices.
Argon Chat Completions request and SDK examples
Set AVALAI_API_KEY in your server environment. The OpenAI SDK base URL is https://api.avalai.ir/v1. Start without optional effort, thinking-budget, or sampling overrides; this release does not establish a new control schema or default effort.
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "gemini-4-argon",
"messages": [
{"role": "user", "content": "Review a database migration plan: identify failure modes and give a concise verification checklist."}
]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AVALAI_API_KEY"],
base_url="https://api.avalai.ir/v1",
)
response = client.chat.completions.create(
model="gemini-4-argon",
messages=[
{
"role": "user",
"content": "Review a database migration plan: identify failure modes and give a concise verification checklist.",
}
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
});
const response = await client.chat.completions.create({
model: "gemini-4-argon",
messages: [
{ role: "user", content: "Review a database migration plan: identify failure modes and give a concise verification checklist." },
],
});
console.log(response.choices[0].message.content);Illustrative Argon response
This is an illustrative response, not a captured live API result. The token counts and exchange rate are examples, not a tokenizer measurement or a current currency quote.
{
"id": "example-gemini-4-argon",
"created": 1792281600,
"model": "gemini-4-argon",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Check backward compatibility, rehearse rollback, validate migrated records, and monitor error rates before expanding the rollout.",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"prompt_tokens": 100,
"completion_tokens": 50,
"total_tokens": 150,
"completion_tokens_details": null,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 100,
"audio_tokens": null,
"image_tokens": null
}
},
"estimated_cost": {
"unit": "0.0007000000",
"irt": 70,
"exchange_rate": 100000
}
}At promotional rates, 100 uncached input tokens and 50 output tokens cost $0.0007. At the sample exchange rate of 100,000 Tomans (IRT) per USD, that is 70 Tomans. Actual usage, reasoning details, exchange rates, and estimated costs can differ. Use AvalAI's precise billing records for accounting rather than treating estimated_cost as a guaranteed final charge.
Argon Responses example
Responses uses input instead of Chat Completions messages. With the OpenAI SDK, read final text from response.output_text rather than choices[0].message.content.
curl https://api.avalai.ir/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "gemini-4-argon",
"input": "Review a database migration plan: identify failure modes and give a concise verification checklist."
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AVALAI_API_KEY"],
base_url="https://api.avalai.ir/v1",
)
response = client.responses.create(
model="gemini-4-argon",
input="Review a database migration plan: identify failure modes and give a concise verification checklist.",
)
print(response.output_text)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
});
const response = await client.responses.create({
model: "gemini-4-argon",
input: "Review a database migration plan: identify failure modes and give a concise verification checklist.",
});
console.log(response.output_text);Argon Messages example
Messages uses the Anthropic-compatible schema. If using the Anthropic SDK, set its base URL to the host https://api.avalai.ir, without appending /v1 or /messages; the SDK appends its own route. Read text from the returned content blocks, not OpenAI choices.
curl https://api.avalai.ir/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $AVALAI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "gemini-4-argon",
"max_tokens": 2048,
"messages": [
{"role": "user", "content": "Review a database migration plan: identify failure modes and give a concise verification checklist."}
]
}'Argon native Gemini example
Use the native contents/parts schema and the model-qualified :generateContent action. The Google GenAI SDK uses the host-only base URL with API version v1beta.
curl https://api.avalai.ir/v1beta/models/gemini-4-argon:generateContent \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $AVALAI_API_KEY" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "Review a database migration plan: identify failure modes and give a concise verification checklist."}]}
]
}'import os
from google import genai
client = genai.Client(
api_key=os.environ["AVALAI_API_KEY"],
http_options={
"api_version": "v1beta",
"base_url": "https://api.avalai.ir",
},
)
response = client.models.generate_content(
model="gemini-4-argon",
contents="Review a database migration plan: identify failure modes and give a concise verification checklist.",
)
print(response.text)import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({
apiKey: process.env.AVALAI_API_KEY,
httpOptions: {
apiVersion: "v1beta",
baseUrl: "https://api.avalai.ir",
},
});
const response = await client.models.generateContent({
model: "gemini-4-argon",
contents: "Review a database migration plan: identify failure modes and give a concise verification checklist.",
});
console.log(response.text);DeepSeek request after the automatic upgrade
Existing code continues to work. This Chat Completions request deliberately keeps deepseek-flash; existing deepseek-v4.1-flash requests can keep that ID instead. For the OpenAI SDK examples above, retain your existing DeepSeek ID in the model argument rather than replacing it with the base-model name.
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "deepseek-flash",
"messages": [
{"role": "user", "content": "Review a database migration plan: identify failure modes and give a concise verification checklist."}
]
}'Illustrative DeepSeek response
This is also an illustrative response, not a captured live API result. The requested AvalAI ID is shown here; the base-model name is not required as a new client identifier or a promised response field.
{
"id": "example-deepseek-flash",
"created": 1792281600,
"model": "deepseek-flash",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Check backward compatibility, rehearse rollback, validate migrated records, and monitor error rates before expanding the rollout.",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"prompt_tokens": 100,
"completion_tokens": 50,
"total_tokens": 150,
"completion_tokens_details": null,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 100,
"audio_tokens": null,
"image_tokens": null
}
},
"estimated_cost": {
"unit": "0.0000450000",
"irt": 4.5,
"exchange_rate": 100000
}
}At the unchanged DeepSeek rates, the illustrative 100 uncached input tokens and 50 output tokens cost $0.000045, or 4.5 Tomans at the same example exchange rate. Both upgraded IDs have these rates.
Integration checklist
- For Argon: select
gemini-4-argonexplicitly, choose one of the four supported formats, and use that format's request and response schema. - For both DeepSeek IDs: no migration is required. Keep the current ID and client code; run representative regression checks without assuming unchanged answer text.
- For reasoning: ask for conclusions, concise rationale, citations, and verification checks, not hidden chain-of-thought. Do not copy an effort enum or thinking budget from an older Gemini or DeepSeek release.
- For production: set realistic output budgets and timeouts, test tool permissions and continuation, monitor usage and billing, and budget for Argon's standard rates from December 1.