Support incremental tool declarations on GCP (#60617)

## What changed

Allow GCP Responses requests to use `incremental_tools_legacy`. When enabled, tool declarations are sent through `additional_tools` inputs instead of the top-level `tools` array.

## Testing

Extend Vertex request coverage to check incremental tool declarations, including namespaces, tool search, and `exec_command`. Add GCP cases to the scenario that verifies tool catalog updates are appended without rewriting history, with incremental tools enabled and disabled.

GitOrigin-RevId: 8f4c02f8d62575e24e695d6fae0472a09625409f
This commit is contained in:
Alex Kira
2026-11-10 16:13:17 +00:00
committed by copyberry
parent 039d0f27d5
commit 0d37c062de
4 changed files with 33 additions and 12 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ use codex_file_system::EnvironmentAccess;
use codex_mcp::McpBinding;
use codex_model_provider_info::AMAZON_BEDROCK_PROVIDER_ID;
use codex_model_provider_info::AMAZON_BEDROCK_RUNTIME_PROVIDER_ID;
use codex_model_provider_info::GCP_PROVIDER_ID;
use codex_otel::SessionTelemetry;
use codex_plugin::ExecutorPluginHookSource;
use codex_protocol::items::ModelInvocationContext;
@@ -63,7 +64,7 @@ impl StepContext {
} else {
matches!(
self.turn.config.model_provider_id.as_str(),
AMAZON_BEDROCK_PROVIDER_ID | AMAZON_BEDROCK_RUNTIME_PROVIDER_ID
AMAZON_BEDROCK_PROVIDER_ID | AMAZON_BEDROCK_RUNTIME_PROVIDER_ID | GCP_PROVIDER_ID
)
.then_some(Feature::IncrementalToolsLegacy)
}