mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user