Skip to content

feat(provider): add CommandCode provider - #6449

Open
lincolnthalles wants to merge 4 commits into
anomalyco:devfrom
lincolnthalles:feat/commandcode-provider
Open

feat(provider): add CommandCode provider#6449
lincolnthalles wants to merge 4 commits into
anomalyco:devfrom
lincolnthalles:feat/commandcode-provider

Conversation

@lincolnthalles

Copy link
Copy Markdown

CommandCode (https://commandcode.ai) is an OpenAI-compatible gateway that relays models from many labs (Anthropic, OpenAI, Google, DeepSeek, Alibaba, Moonshot, and others) under a single API and key.

The catalog didn't include it, so its models were unavailable to tooling that consumes models.dev.

This adds the provider with a compliant logo and 63 models.

Since CommandCode hosts other labs' models rather than creating its own, every entry is override-only: it points at the existing lab metadata via base_model and authors only what differs on this host - cost, reasoning controls, and reasoning side-channel.

Notes for review:

  • Host classification: multi-model relay (@ai-sdk/openai-compatible with a custom api). Reasoning options are copied from each model's first-party lab entry rather than a generic GPT-style set (e.g., DeepSeek V4 = toggle + high/max, Qwen = toggle + thinking_budget, Tencent Hy = effort none|high with no toggle).
  • Per-model pricing and documentation links are cited in the leading comment block of each file (the sync-safe position); host-specific quirks such as the 400K context cap on GPT-5.4/5.5 and DeepSeek's off-peak pricing are documented there too.
  • Sync module is not viable: the models API is too poor, providing only model IDs and context limits.
  • bun validate passes.

closes #3086 #4530 #5937 #6360

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/commandcode/models/gpt-5.4.toml:14 - Check: Context-tier pricing must match what this host charges when the standard rate already mirrors OpenAI. Why: Base rates match OpenAI GPT-5.4/5.5 (2.5/15 and 5/30 with the same cache reads), and both files still allow up to 400K context, so prompts in the 272K–400K band would hit OpenAI’s long-context tier on first-party and on peers such as Neon. These entries omit [[cost.tiers]] entirely, so catalog costs understate long-context usage if CommandCode mirrors OpenAI banding. Action: Add the 272K [[cost.tiers]] bands (OpenAI: 5.4 5/22.5/0.5, 5.5 10/45/1) or document in the leading comment that CommandCode flat-prices through the 400K cap.
  • [medium] [possible mistake] providers/commandcode/models/gpt-5.6-luna.toml:15 - Check: Long-context cost tiers should carry the same cost keys the base band publishes when the host charges them. Why: Base [cost] includes cache_write (luna 0.25, sol 6.25), and OpenAI/Neon long tiers also publish cache_write (0.50 / 12.5). The 272K tiers here only set input/output/cache_read, so long-context cache pricing is incomplete versus the sibling gpt-5.6-terra entry and established peers. Action: Add cache_write on both long tiers (or cite CommandCode docs that long-context cache writes are uncharged/different).
  • [medium] [possible mistake] providers/commandcode/models/thinkingmachines/inkling-small.toml:5 - Check: Relay reasoning_options = [] means affirmative no caller control, not uncertainty (AGENTS.md / audit skill). Why: The file claims always-on with no control, but same-model relays commonly expose effort (OpenRouter/Kilo none|minimal|low|medium|high|max, Vercel also xhigh), and first-party Inkling on this PR uses toggle + graded effort. Empty options will hide real controls if CommandCode forwards them. Action: Align with the host’s real wire surface (likely effort, and toggle if present) with a leading wire comment, or keep [] only with host-specific evidence that effort/toggle are rejected.
  • [low] [possible mistake] providers/commandcode/models/tencent/Hy3.toml:6 - Check: Multi-model relays should copy the underlying model’s effort set from lab/same-surface peers. Why: hy3 / hy3-paid use ["none", "high"], but established peers (OpenRouter, Vercel, opencode-go) and HF-facing docs use none|low|high for Hy3. Dropping low understates the control surface if CommandCode passes reasoning_effort through. Action: Verify CommandCode’s accepted values; add low if supported, or cite host docs that only none/high work.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/commandcode/models/claude-haiku-4-5-20251001.toml:6 - Check: Reasoning options must match this host’s API surface, not treat Anthropic Messages and OpenAI-compatible chat as interchangeable (AGENTS.md Reasoning options / audit skill). Why: CommandCode is an @ai-sdk/openai-compatible multi-model gateway, but Haiku is authored with Anthropic Messages-style budget_tokens only. Same-surface peers (e.g. OpenRouter) expose Claude via gateway toggle/effort, not pure Messages budgets. Copying lab Messages controls can advertise a budget field this host does not accept. Action: Verify CommandCode’s actual Claude request shape; if it is chat-completions/openai-compatible only, replace budget_tokens with the host/peer control set (often toggle and/or effort) and document the wire path; keep budget_tokens only with evidence this path proxies Anthropic thinking.budget_tokens.
  • [high] [possible mistake] providers/commandcode/models/claude-sonnet-4-6.toml:9 - Check: Same host-surface rule for Claude Sonnet 4.6. Why: Entry mixes lab Messages effort + budget_tokens on an openai-compatible relay. Established openai-compat peers commonly use toggle + effort without Messages budget (e.g. OpenRouter). Action: Confirm CommandCode’s Claude controls for Sonnet 4.6; drop invented/unproxied budget_tokens and align to lab∩same-surface controls this host actually forwards.
  • [medium] [possible mistake] providers/commandcode/models/tencent/hy3-paid.toml:3 - Check: Distinct provider model IDs that share base_model need a distinguishing display name when the ID alone is not enough. Why: tencent/Hy3 (free, $0) and tencent/hy3-paid both inherit lab name "Hy3" with no override, so the paid SKU is indistinguishable in UI/catalog listings. Free/paid siblings elsewhere set an explicit name. Action: Add name = "Hy3 Paid" (or the host’s official label) on hy3-paid.toml; consider name = "Hy3 Free" on the free entry if that is how CommandCode brands it.
  • [medium] [possible mistake] providers/commandcode/models/zai-org/GLM-5.toml:4 - Check: interleaved must reflect this host’s reasoning side-channel when present. Why: Lab zhipuai/glm-5 and same-surface peers author [interleaved] field = "reasoning_content", and CommandCode already sets that for GLM-5.3 / 5.3-Flash on this provider, but GLM-5 / 5.1 / 5.2 omit it. If CommandCode returns reasoning_content for those IDs too, clients will miss the side channel. Action: Verify response shape for GLM-5, GLM-5.1, and GLM-5.2 on CommandCode; add matching [interleaved] (and keep it off only if this host truly does not expose a side channel for those IDs).

…me fixes

Replace budget_tokens with toggle for Haiku/Sonnet, add toggle+effort
for Sonnet, set Hy3 Free name, and add reasoning_content interleaved
to GLM-5 family.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/commandcode/models/thinkingmachines/inkling.toml:1 - Check: Multi-model OpenAI-compatible relays must use same-surface peer controls, not a different lab API shape (AGENTS.md Reasoning options; audit skill Step 1–2). Why: CommandCode is @ai-sdk/openai-compatible (api …/v1), but this file authors Anthropic-Messages-style controls (thinking.type toggle + output_config.effort without none). Same-surface openai-compat peers (e.g. OpenRouter/Baseten/Vercel) expose effort including none for off, not that Messages pair. Consumers get the wrong wire surface and a false toggle. Action: Replace with the openai-compat peer set (typically effort including none, no Messages output_config toggle), document the real CommandCode field, and keep inkling / inkling-small consistent on this host.
  • [medium] [possible mistake] providers/commandcode/models/claude-sonnet-4-6.toml:1 - Check: Toggle/effort wire comments must match this host’s actual request path; do not mix Anthropic Messages and OpenAI-compat surfaces. Why: Sonnet 4.6 documents thinking.type + output_config.effort, while claude-sonnet-5.toml documents thinking.type + reasoning_effort on the same gateway. Those cannot both be accurate for one OpenAI-compatible API. Action: Verify CommandCode’s Claude request fields once, then make every Claude entry’s leading wire comments (and option shape) match that single surface.
  • [medium] [possible mistake] providers/commandcode/models/google/gemini-3.7-flash.toml:11 - Check: Host pricing should be internally consistent across the same model family unless a documented host exception exists. Why: Only gemini-3.7-flash sets cache_write = 0.08334; the other CommandCode Gemini Flash entries that bill cache_read omit cache_write. That usually means a copy error or an undocumentated exception. Action: Confirm CommandCode’s Gemini cache-write pricing; add cache_write to the other Gemini entries that support it, or remove it from 3.7 and note why only that model differs.
  • [low] [possible mistake] providers/commandcode/models/Qwen/Qwen3.8-Flash.toml:1 - Check: Provider-authored interleaved should reflect this host’s reasoning side-channel when peers/lab expose reasoning_content. Why: Qwen3.8-Max and Qwen3.8-Max-0902 set [interleaved].field = "reasoning_content", but Qwen3.8-Flash and Qwen3.8-27B omit it even though Alibaba’s first-party Qwen3.8 Flash/Max entries both publish that side-channel. Action: Confirm CommandCode responses for Flash/27B; add the same interleaved block if reasoning_content is present, or note why Max-only.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CommandCode.ai models

1 participant