Files
PaperClipAI/server
Devin FoleyandPaperclip 802c24b6f5 fix(codex-local): omit adapterConfig.model when operator picks default
Make codex_local's "default" model selection mirror claude_local's
behavior: when the operator leaves the model blank, persist the agent
with no `adapterConfig.model` rather than pinning to a Paperclip-chosen
fallback.

The previous fallback baked `gpt-5.3-codex` into every default-created
codex_local agent. That model — and the full *-codex family plus
gpt-5/5.1/5.2 — is API-key-only and rejected on ChatGPT subscription
auth with "The 'gpt-5.3-codex' model is not supported when using Codex
with a ChatGPT account." Subscription users hit this on the very first
heartbeat after onboarding.

Omitting is the right shape because the Codex CLI's own default is
auth-mode-aware: ChatGPT-subscription accounts get gpt-5.5, API-key
accounts get the codex-tuned default. A Paperclip-side pin masks that
nuance and downgrades whichever group it isn't built for.

- ui build-config: only set `adapterConfig.model` when the operator
  picked one (parity with claude_local's pattern).
- server route: drop the codex_local-specific model fallback in
  `applyCreateDefaultsByAdapterType`. Bypass-sandbox default is left in
  place because it's a security/permission posture, not a model choice.
- UI consumers (NewAgent, AgentConfigForm, OnboardingWizard): stop
  pre-populating the model field with `DEFAULT_CODEX_LOCAL_MODEL` when
  the user selects the Codex adapter. The constant is preserved as an
  exported value for anyone who wants to opt in to a pin.
- Fast mode: treat an omitted model as fast-mode-capable. Without this
  the new default-omit path would silently drop the `service_tier="fast"`
  override even when the CLI's chosen default (gpt-5.5 on subscription)
  supports it. Matches the manual-model policy: pass through and let
  the CLI reject the override if the chosen model can't use it.
- Tests: assert build-config omits `model` when blank, and that fast
  mode applies when model is omitted.

Closes #5371.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-10 20:26:05 -07:00
..
2026-03-12 13:09:22 -05:00