Skip to content

fix: GPT-6 models and Command Code provider - #4101

Open
elka-firmanda wants to merge 3 commits into
tailcallhq:mainfrom
elka-firmanda:main
Open

elka-firmanda wants to merge 3 commits into
tailcallhq:mainfrom
elka-firmanda:main

Conversation

@elka-firmanda

@elka-firmanda elka-firmanda commented Nov 11, 2026 •

Copy link
Copy Markdown

Summary

Add GPT-6 model configuration and Command Code provider support.

Changes

  • Register GPT-6 and GPT-6.1 models for OpenAI and Codex and route GPT-6 requests through the Responses API.
  • Register Command Code with a dedicated response repository that routes claude-* models to the Anthropic /messages endpoint and every other model to /chat/completions, mirroring the OpenCode Zen pattern. Models are discovered from the provider's /models endpoint.
  • Leave the shared OpenAI model DTO untouched.

Testing

  • cargo check -p forge_repo -p forge_config -p forge_app -p forge_domain
  • cargo test -p forge_repo --lib provider::command_code::
  • cargo test -p forge_repo --lib test_command_code_config
  • cargo test -p forge_repo --lib test_uses_responses_api
  • cargo test -p forge_app --lib dto::openai::model

Register GPT-6 and GPT-6.1 models for OpenAI and Codex, and route GPT-6 models through the Responses API.
Register Command Code as a built-in OpenAI provider and filter models by supported endpoint, excluding models that do not serve chat completions.
@CLAassistant

CLAassistant commented Nov 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: provider Updates provider.json configuration. labels Nov 11, 2026
@amitksingh1490 amitksingh1490 changed the title feat: add GPT-6 models and Command Code provider fix: GPT-6 models and Command Code provider Nov 11, 2026
@amitksingh1490 amitksingh1490 added type: fix Iterations on existing features or infrastructure. and removed type: feature Brand new functionality, features, pages, workflows, endpoints, etc. labels Nov 11, 2026
@amitksingh1490
amitksingh1490 enabled auto-merge (squash) November 11, 2026 04:11
pub supported_parameters: Option<Vec<String>>,
/// Routes the provider serves this model on, e.g. `/chat/completions`.
/// Absent for providers that do not report per-model routes.
pub supported_endpoints: Option<Vec<String>>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't change this, Ideally it should be handled as we have handled opencode zen

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3d074b5 — dropped supported_endpoints and the model filter from the shared OpenAI DTO and added a dedicated CommandCodeResponseRepository instead: claude-* routes to the Anthropic /messages endpoint, everything else to /chat/completions. The Claude models are no longer filtered out of the model list. This mirrors the OpenCode Zen handling as suggested.

Drop the supported_endpoints model capability from the shared OpenAI DTO and
the resulting model filter. Command Code now gets its own response repository
that routes Claude models to the Anthropic /messages endpoint and every other
model to /chat/completions, mirroring how OpenCode Zen is handled.

This also stops hiding the Claude models that only answer on /messages.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
auto-merge was automatically disabled November 11, 2026 10:40

Head branch was pushed to by a user without write access

@elka-firmanda

Copy link
Copy Markdown
Author

@amitksingh1490 re-review requested for 3d074b5 — the supported_endpoints addition and the model filter are gone; Command Code now has a dedicated router that sends claude-* to /messages and everything else to /chat/completions, like OpenCode Zen. The ci / autofix.ci runs for the new head are waiting on maintainer approval.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure. type: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants