anomalyco / anomalyco/opencode

models: catalog variant settings sent with camelCase keys to OpenAI-compatible providers -> 400 'Extra inputs are not permitted'

Open
#41,971 2 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 12, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Variant settings from the built-in model catalog are serialized into the request body with their raw camelCase keys (e.g. reasoningEffort). Strict OpenAI-compatible providers reject these as unknown fields, so selecting a standard variant (e.g. max) on models like Fireworks kimi-k3 fails with a 400 before any token is generated. The same body with the snake_case key (reasoning_effort) succeeds.

Environment

  • opencode version: 0.0.0-next-17276 (v2, next channel)
  • OS: Linux 6.17.0-1022-azure x86_64 (Ubuntu)
  • Terminal: xterm-256color
  • Shell: /usr/bin/zsh
  • Install/channel: npm @opencode-ai/cli@next, background service
  • Active plugins: @javargasm/opencode-kiro-auth, @plannotator/opencode@latest, @tarquinen/opencode-dcp, cc-safety-net@latest, envsitter-guard, oc-codex-multi-auth

Reproduction

  1. Use a fresh config with no provider overrides (stock catalog).
  2. Select a model whose catalog variants carry reasoningEffort, e.g. fireworks-ai/accounts/fireworks/models/kimi-k3 (catalog variant: {"id": "max", "settings": {"reasoningEffort": "max"}}).
  3. Send any message (e.g. via a subagent with variant: max).
  4. Observe AI.Error: AISDK.doStream: Bad Request from the session runner.

Expected Behavior

Variant settings keys are normalized before serialization (reasoningEffortreasoning_effort, reasoningSummaryreasoning_summary), matching what OpenAI-compatible endpoints accept, so catalog variants work out of the box on strict providers.

Actual Behavior

The outgoing request contains the camelCase key verbatim. Fireworks returns:

400 invalid_request_error
"Extra inputs are not permitted, field: 'reasoningEffort', value: 'max'"

Confirmed by capturing the exact outgoing body (26 KB capture shows variant settings pass through raw; nested settings like chat_template_kwargs also arrive verbatim) and by direct API calls: identical body with reasoningEffort → 400, with reasoning_effort → 200.

Additional Context

  • No user config involved in the failure: the failing kimi-k3 model had zero config overrides; only the shipped catalog metadata was in play.
  • OpenAI/Azure/GitHub Copilot families are unaffected — that SDK path recognizes reasoningEffort/reasoningSummary and renders them correctly; the raw pass-through only surfaces on strict OpenAI-compatible endpoints.
  • Affected catalogs observed in the live model catalog (all with camelCase reasoningEffort variants): Fireworks (12 models), Together AI (7), Z.AI (1), Cloudflare Workers AI (7), Cloudflare AI Gateway (33), Hugging Face (12), opencode zen (3).
  • Workaround: per-model config overlays defining the same variants with snake_case reasoning_effort settings. This requires one overlay per affected model (63 models across 7 providers in our case) and does not remove the camelCase key from the merged catalog.
  • Frequency: consistent, not intermittent.
  • Verified on v2 next-17276; V1 behavior not verified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.