Support model providers in the app-server model/list API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
app-server API through my Giskard web frontend
What feature would you like to see?
Problem
The app-server model/list API currently lists models only for the configured
default provider. Unlike thread/start, clients cannot select a model provider.
This makes it difficult for clients to present models for another configured
provider before starting a thread.
Proposed behavior
Add an optional modelProvider parameter to model/list:
{
"modelProvider": "amazon-bedrock",
"limit": 100,
"cursor": null,
"includeHidden": false
}
When omitted, model/list should continue using the configured default provider.
The response should also identify the provider associated with the returned
catalog. Two possible shapes are:
- Add
modelProviderto every model, allowing future mixed-provider responses. - Add
modelProvidertoModelListResponse, establishing that one response
always contains models from exactly one provider.
The response-level field may be preferable because the request resolves exactly
one provider and avoids repeating identical metadata:
{
"modelProvider": "amazon-bedrock",
"data": [
{
"id": "openai.gpt-5.6-sol",
"model": "openai.gpt-5.6-sol"
}
],
"nextCursor": null
}
Listing models from all providers could be considered separately. That design
would need explicit rules for ordering, pagination, per-provider defaults,
latency, and partial failures.
Implementation considerations
- Unknown provider IDs should return an invalid-request error.
- Provider resolution should use the latest effective configuration.
- Pagination cursors should remain scoped to the selected provider.
- Provider-specific model managers should be reused in memory.
- Alternate providers should not share the current file-backed model cache,
because that cache is not partitioned by provider.
Reference implementation
I explored an implementation on my fork:
https://github.com/marmeladema/codex/tree/model-list-provider-support
The reference implementation uses the per-model modelProvider shape. It also
includes generated API schemas, documentation, and integration coverage for
explicit provider selection, default-provider fallback, and unknown providers.
I understand that external pull requests are not accepted; the fork is provided
only as technical exploration and a concrete reference for the design.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the app-server model/list API and the generated API schemas, then compare the existing thread/start provider selection behavior. Review the documentation and integration coverage described in the reference implementation. Done means explicit provider selection, default-provider fallback, invalid unknown-provider handling, provider-scoped pagination, and a response that identifies its provider.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100