Send x-session-id for OpenRouter Chat Completions and Anthropic Messages requests while preserving explicit opt-out and cache-disabled behavior.
closes#9102
Enable unsigned thinking replay and metadata-driven adaptive effort for Fireworks Messages models, with verified fallbacks for incomplete catalog metadata. Remove redundant GLM 5.2 and Kimi K3 effort aliases and add regression tests.
closes#9323
Add grok-build-0.1 to XAI_BUILTIN_EXCLUDED_MODEL_IDS so the generated xAI
catalog only lists grok-4.3, grok-4.5 and grok-4.6. Update the exclusion
test and drop the thinking-level assertion for the removed model.
Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>
models.dev's cloudflare-ai-gateway catalog no longer lists workers-ai/*
entries, which removed every openai-completions model from the generated
gateway catalog and narrowed the inferred provider api union. Derive the
gateway's workers-ai models from the cloudflare-workers-ai catalog and pin
the provider's api generic. Also move the zai glm-5.3 cost assertion, now
that models.dev prices it in the zai API catalog.
#7638 hardcoded vLLM's thinking_token_budget. Map thinkingBudgets through
thinkingTokenBudgetField, keep the boolean as a vLLM alias, clamp so the
answer keeps 1024 tokens, and document it.
fixes#8274
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
DEEPSEEK_V4_FLASH_THINKING_LEVEL_MAP (which enables the low effort level)
was only applied to deepseek/deepseek-v4-flash, so the same model served
through opencode and opencode-go only offered off/high/max. models.dev
reports reasoning_options effort values of low/high/max for these
providers, and the live opencode-go API accepts reasoning_effort=low
(verified against https://opencode.ai/zen/go/v1).
Apply the flash map to every deepseek-v4-flash variant on the deepseek,
opencode, and opencode-go providers. qwen-token-plan is left unchanged
since its gateway support for the low effort level is not verified.
* feat(ai): route xAI models through Responses and default to Grok 4.6
Send built-in xAI catalog models through the Responses API with
store: false and include reasoning.encrypted_content so encrypted
reasoning is requested and replayed, including future models.dev
additions. Thinking levels come from models.dev reasoning_options
(grok-4.6 exposes xhigh); models without verified options
(grok-build-0.1) keep reasoning always on and never send unsupported
"none"/"minimal" efforts. Narrow the xAI provider to the Responses API,
send pi's runtime User-Agent on xAI requests for provider-side
attribution, and make Grok 4.6 the default xAI model.
* fix(ai): drop duplicate xAI encrypted-reasoning tests
Azure already covers the shared replay path; keep the xAI-specific include-without-effort case next to the existing request tests.
---------
Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>
GA qwen3.8-max is on models.dev for alibaba-token-plan[-cn]. Point the
Qwen3.8 effort map at the GA id and exclude the retired preview so
regenerate does not revive it.
* fix(ai): send max_tokens for Z.AI providers
Z.AI (zai, zai-coding-cn, api.z.ai, open.bigmodel.cn) ignores
max_completion_tokens and only honors max_tokens, so the configured
output cap never applied and Z.AI fell back to its 65536 default.
Add isZai to detectCompat's useMaxTokens condition.
* fix(ai): set zai max_tokens compat in model generator
Per review feedback: the model generator now maps Z.AI to max_tokens, so
regenerated Z.AI model entries carry compat.maxTokensField="max_tokens"
(Z.AI ignores max_completion_tokens). The runtime detectCompat change is
kept as a fallback for custom/self-hosted Z.AI base URLs not in the catalog,
matching how moonshot/together/nvidia are handled in both places.
Route claude-opus-5 through the Anthropic Messages API with adaptive
thinking, the Copilot minimal thinking-level override, and pin the
extended 1M context window alongside the other Copilot Opus models.