Restrict legacy incremental tools to Amazon Bedrock providers (#60040)

## What changed

Gate `incremental_tools_legacy` on the `amazon-bedrock` and
`amazon-bedrock-runtime` provider IDs instead of the OpenAI provider for regular
Responses requests. Responses Lite continues to use `incremental_tools`.

## Testing

Expand the tool catalog update scenarios to cover both Bedrock provider IDs with
legacy incremental tools enabled and disabled. Update the regular Responses tool
removal scenario to use the Bedrock provider.

GitOrigin-RevId: ad0ff31975166a2a7fdcee6fefc272ecc79dd448
This commit is contained in:
Alex Kira
2026-11-07 02:37:50 +00:00
committed by copyberry
parent af9a98b074
commit 762f87d5bb
3 changed files with 23 additions and 8 deletions
+7 -3
View File
@@ -14,7 +14,8 @@ use codex_extension_api::ExtensionData;
use codex_features::Feature;
use codex_file_system::EnvironmentAccess;
use codex_mcp::McpBinding;
use codex_model_provider_info::OPENAI_PROVIDER_ID;
use codex_model_provider_info::AMAZON_BEDROCK_PROVIDER_ID;
use codex_model_provider_info::AMAZON_BEDROCK_RUNTIME_PROVIDER_ID;
use codex_otel::SessionTelemetry;
use codex_plugin::ExecutorPluginHookSource;
use codex_protocol::items::ModelInvocationContext;
@@ -60,8 +61,11 @@ impl StepContext {
if self.settings.model_info.use_responses_lite {
Some(Feature::IncrementalTools)
} else {
(self.turn.config.model_provider_id == OPENAI_PROVIDER_ID)
.then_some(Feature::IncrementalToolsLegacy)
matches!(
self.turn.config.model_provider_id.as_str(),
AMAZON_BEDROCK_PROVIDER_ID | AMAZON_BEDROCK_RUNTIME_PROVIDER_ID
)
.then_some(Feature::IncrementalToolsLegacy)
}
}