Developer Dashboard

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 fieldCurrent value
Model IDgemini-4-argon
Maximum input tokens1,048,576
Maximum output tokens1,048,576
Input modalitiesText, image, audio, video, PDF
OutputText; not audio or image generation
Other capabilitiesReasoning, 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 requestsBase model after the upgradeRequired client action
deepseek-flashDeepSeek-V4.1-Flash-1017None
deepseek-v4.1-flashDeepSeek-V4.1-Flash-1017None

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:

EvaluationGoogle-reported Argon resultEvaluated task
DeepSWE v1.177.9%Long-horizon software engineering
AutomationBench51.3%End-to-end business workflow execution
LVBench91.7%Long-video understanding
CWE-bench v168%, tied for firstSecurity 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 formatRouteRequest shape
Native Geminihttps://api.avalai.ir/v1beta/modelscontents and parts; invoke gemini-4-argon:generateContent
OpenAI-compatible Chat Completionshttps://api.avalai.ir/v1/chat/completionsmodel and messages
Anthropic-compatible Messageshttps://api.avalai.ir/v1/messagesmodel, messages, and max_tokens
OpenAI-compatible Responseshttps://api.avalai.ir/v1/responsesmodel 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 periodInputCached inputOutput
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 IDInputCached inputOutput
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.

bash
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."}
    ]
  }'
python
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)
javascript
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.

json
{
  "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.

bash
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."
  }'
python
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)
javascript
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.

bash
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.

bash
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."}]}
    ]
  }'
python
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)
javascript
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.

bash
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.

json
{
  "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-argon explicitly, 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.