mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Add a built-in Google Cloud Vertex AI provider (#56265)
## What changed - Support `model_provider = "gcp"` with a Vertex AI endpoint derived from `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION`, defaulting to the `global` location. - Obtain credentials through `gcloud auth application-default print-access-token` by default, and allow `base_url`, `auth`, and `http_headers` overrides under `model_providers.gcp`. - Use a static model catalog tailored to Vertex AI, preserve function tools, namespaces, and client-side tool search, and support remote compaction V2. Disable unsupported reasoning summaries, Responses Lite, custom tools, web search, and image generation. - Expose a `gcp` account type through the app-server protocol and generated clients without resolving credentials during account reads or requiring OpenAI authentication. ## Testing Add coverage for endpoint resolution, configuration overrides, model catalog filtering, authenticated requests, unsupported request fields, missing credentials, account reporting across provider changes, and automatic remote compaction. GitOrigin-RevId: 97a3158269e6dbc2605e2cf576998e09817ea12a
This commit is contained in:
@@ -73,7 +73,7 @@ pub(crate) async fn program_for_turn(
|
||||
Some(Account::ApiKey { .. }) => {
|
||||
features.enabled(Feature::ApiKeyCyberAccessPrograms)
|
||||
}
|
||||
Some(Account::AmazonBedrock { .. }) | None => false,
|
||||
Some(Account::AmazonBedrock { .. } | Account::Gcp {}) | None => false,
|
||||
};
|
||||
return Ok(eligible.then_some(standard.into()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user