codex icon indicating copy to clipboard operation
codex copied to clipboard

Expose catalog-backed DCS/deepseek-flash-v4.1 as a subagent model override

Open Duoyu052 opened this issue 1 month ago • 2 comments

Request

Please make a model that is already available in a user's Codex model catalog selectable as an explicit subagent model override, or provide a supported way for the user to add it to the subagent interface's allowed override list.

Current behavior

  • The local Codex catalog selected by model_catalog_json contains the exact slug DCS/deepseek-flash-v4.1 (display name deepseek-flash-v4.1). The model is routed through a local opencodex gateway to DCS.
  • The multi_agent_v1.spawn_agent tool presented to the coordinator lists DCS/glm-5.3 and DCS/kimi-k3.1-pro as available DCS model overrides, but does not list DCS/deepseek-flash-v4.1.
  • As a result, the coordinator cannot explicitly choose the DeepSeek model when delegating, even though it is in the model catalog. This affects a project whose subagent policy requires explicit selection of an available DCS model.

Expected behavior

DCS/deepseek-flash-v4.1 should be accepted as an explicit subagent model override when the catalog and account/gateway make it available. If the subagent interface maintains a separate allowlist, please expose a supported configuration or refresh path and explain any eligibility checks. An unsupported model should produce a clear reason rather than silently inheriting another model.

Reproduction

  1. Configure Codex to read a model catalog containing DCS/deepseek-flash-v4.1.
  2. Start a coordinator task and inspect the available model overrides on multi_agent_v1.spawn_agent.
  3. Observe that the two other DCS slugs are listed but DCS/deepseek-flash-v4.1 is absent.

No credentials, logs, or private project data are included in this report.

Duoyu052 avatar Oct 30 '26 02:10 Duoyu052

Adding a related reproduced rejection, rather than only an omitted advertised model. Unlike the original report, my scoped model is absent from the native offline catalog, so I am not assuming an identical root cause.

Environment: Codex CLI 0.166.0, macOS 27.0.1 arm64, native multi_agent_v1.spawn_agent through T3 0.1.7-nightly.20261102.4093 (not T3's separate delegate_task). An existing custom Responses provider requires the full scoped model ID. Relevant config; provider endpoint/auth omitted:

model_provider = "cpa-personal"
model = "personal/codex-oauth/gpt-6.1-sol"

[agents]
default_subagent_model = "personal/codex-oauth/gpt-6-luna"
default_subagent_reasoning_effort = "high"

No model_catalog_json override is configured; api_key_model_discovery is enabled.

Reproduction: In a coordinator using that configuration, request a fresh-context, no-tools acknowledgment with no model or reasoning override:

{"message":"Reply STARTUP_OK only; do not use tools.","fork_context":false}

spawn_agent fails before returning a child ID:

Unknown model `personal/codex-oauth/gpt-6-luna` for spawn_agent. Available models: gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol

Controls / routing evidence:

  • An ephemeral direct CLI inference using the same profile/provider/auth, exact scoped Luna ID and high completes successfully in 13 seconds with no tools. It warns that model metadata is missing and uses fallback metadata. This proves inference works, not that native child startup works.
  • codex-personal debug models (codex-personal is my existing profile launcher) lists canonical gpt-6-luna, not the scoped ID. The provider's /v1/models returns HTTP 200 and lists the scoped ID, not canonical gpt-6-luna.
  • An explicit spawn retry with canonical model: "gpt-6-luna" passed admission, but the child then failed with unknown provider for model gpt-6-luna. Removing the prefix therefore changes routing, rather than fixing this setup.

This appears to be the exact-slug native admission/catalog boundary, distinct from the five-model description cap discussed above. The matching rust-v0.166.0 source resolves the omitted model from the configured default and then checks the native registry.

What is the supported registration/discovery contract for custom-provider subagent defaults? A capability-only catalog attempt also failed because base_instructions or model_messages.instructions_template was required. Is there a supported path that preserves the exact scoped ID, inherited provider/auth and native instructions, while retaining auth/backend eligibility checks? Expected: the configured default starts, or an actionable catalog/eligibility error explains what is missing—not a different model/provider fallback.

samaluk avatar Nov 03 '26 12:11 samaluk

I can also reproduce this on Codex CLI 0.171.0 with a custom provider profile.

Environment

  • Codex CLI: 0.171.0
  • Platform: Linux x86_64
  • Provider: opencode-go
  • Profile: go
  • Parent and subagent default model: glm-5.3

Relevant profile

# ~/.codex/go.config.toml

model = "glm-5.3"
model_provider = "opencode-go"
model_reasoning_effort = "high"

[agents]
default_subagent_model = "glm-5.3"
default_subagent_reasoning_effort = "high"

Reproduction

  1. Start Codex with the go profile:
codex --profile go
  1. Ask the parent agent to spawn a subagent.

Observed behavior

The parent starts correctly:

model: glm-5.3
provider: opencode-go
reasoning effort: high

When the parent tries to spawn a subagent, spawn_agent fails before returning a child ID:

Unknown model `glm-5.3` for spawn_agent.
Available models: gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-terra,
gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna,
gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5

If I explicitly pass one of those OpenAI model IDs, the selected provider rejects it:

Model gpt-6.2-sol isn't included in OpenCode Go.
Model gpt-5.5 isn't included in OpenCode Go.

Expected behavior

  • agents.default_subagent_model should apply to the active provider.
  • spawn_agent should accept the provider’s model, or reject it with an actionable error.
  • It should not fall back to OpenAI-only model IDs when a custom provider is active.

Why this is distinct from #40858

In #40858, the child appears to spawn but inherits the parent provider. Here, spawn_agent rejects the configured custom-provider model before spawn, and only offers OpenAI models that the selected provider then rejects.

tr-yasuda avatar Nov 20 '26 06:11 tr-yasuda