You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cbcd446
Browse filesBrowse the repository at this point in the historyBrowse files
fix: start the Codex app-server with the provider of the gateway routing (#733)
## Summary
Codex 0.166 rejects input for a thread whose provider differs from the
one its app-server started with
([openai/codex#57840](openai/codex#57840)).
codex-acp set the gateway provider only per thread, so the app-server
kept `openai`, and the first prompt failed with `modelProviderMismatch`.
## Changes
- The app-server starts with `-c model_provider=…` and `-c
model_providers.<id>=…` for the current provider: the gateway, else
`MODEL_PROVIDER`, else `model_provider` of `CODEX_CONFIG`. These apply
to that process only; `config.toml` is not changed.
- Header values go in environment variables through `env_http_headers`,
so a gateway key is not in the process arguments.
- A provider change from `providers/set`, `providers/disable` or
`authenticate` restarts the app-server, now also when no session is
open.
Codex has no API to change a running app-server's provider, so it is set
at process start, and a change needs a restart.
## Behavior changes
- The first `providers/set` before any session restarts the app-server
once.
- On Codex 0.166, a session can't be resumed after switching to another
provider id (e.g. `openai` → `custom-gateway`). That is Codex behavior,
independent of this change.
0 commit comments