mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Discover model catalogs from HTTPS gateways (#63807)
## Why A custom gateway can serve a Codex model catalog at its existing `/models` route. Requiring a separate `model_catalog_url` leaves that catalog undiscovered when only `base_url` is configured. ## What changed Probe `/models` automatically for custom providers with a query-free HTTPS base URL and no explicit catalog URL. Use a valid Codex catalog as the model picker inventory. If discovery fails, keep the picker usable with an available catalog or the bundled models. Gateway login and token refresh errors still propagate. ## Testing Add HTTPS app-server tests that verify the authenticated `/v1/models` request, picker population from a Codex catalog, and fallback to bundled models for a generic OpenAI model list or a `403` response. GitOrigin-RevId: 654095be1c221d79d932acde8b7289bc4cad0437
This commit is contained in:
@@ -55,7 +55,7 @@ async fn invalid_models_response_reports_bounded_decode_metadata() {
|
||||
let server = MockServer::start().await;
|
||||
for (body, category, column_offset) in [
|
||||
(
|
||||
json!({ "data": [{ "id": "private-model" }] }).to_string(),
|
||||
json!({ "object": "list", "data": [{ "id": "private-model" }] }).to_string(),
|
||||
"Data",
|
||||
0,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user