mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
Enable remote compaction for Amazon Bedrock (#36981)
## What changed - Add provider-owned remote compaction capabilities for unsupported, v1, and v2 protocols. - Mark Amazon Bedrock as v1-only so manual and automatic compaction use `/v1/responses/compact`, even when the v2 feature is enabled. - Preserve v2 support for OpenAI and Azure Responses providers and local compaction for unsupported providers. ## Testing - Cover Amazon Bedrock manual and automatic remote compaction, including endpoint selection, authentication headers, model selection, and reuse of the compacted summary. GitOrigin-RevId: d58093178605d1f8155b93d9a161408177f6ac72
This commit is contained in:
1 parent
e1f39b5f5b
commit
b9ba969f39
10 files changed
+277
-156
No files matched your search
@@ -29,6 +29,7 @@ use crate::provider::ModelProviderFuture;
|
||||
use crate::provider::ProviderAccountResult;
|
||||
use crate::provider::ProviderAccountState;
|
||||
use crate::provider::ProviderCapabilities;
|
||||
use crate::provider::RemoteCompactionSupport;
|
||||
use auth::resolve_provider_auth as resolve_bedrock_provider_auth;
|
||||
use catalog::normalize_bedrock_catalog;
|
||||
pub(crate) use catalog::static_model_catalog;
|
||||
@@ -126,6 +127,7 @@ impl ModelProvider for AmazonBedrockModelProvider {
|
||||
image_generation: false,
|
||||
web_search: true,
|
||||
external_web_access: false,
|
||||
remote_compaction: RemoteCompactionSupport::V1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,6 +370,7 @@ mod tests {
|
||||
image_generation: false,
|
||||
web_search: true,
|
||||
external_web_access: false,
|
||||
remote_compaction: RemoteCompactionSupport::V1,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user