mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
feat: use provider defaults for memory models (#27129)
## Why Memory startup used hardcoded OpenAI model slugs for extraction and consolidation. That works for the default OpenAI-compatible path, but provider-specific backends can require different model identifiers. In particular, Amazon Bedrock should use its Bedrock model ID for these background memory requests instead of the OpenAI `gpt-5.4-mini` / `gpt-5.4` slugs. ## What Changed - Added provider-owned preferred memory model methods alongside `approval_review_preferred_model`. - Updated memory extraction and consolidation to resolve their default model through the active `ModelProvider`. - Added Amazon Bedrock overrides so both memory stages use `openai.gpt-5.4` through Bedrock’s provider-specific model ID. - Kept explicit `memories.extract_model` and `memories.consolidation_model` config overrides taking precedence. - Added startup coverage for default OpenAI and Bedrock memory model selection. #closes #26288
This commit is contained in:
1 parent
fb8f1ea0d5
commit
51fc4b0559
9 files changed
+413
-13
No files matched your search
@@ -190,11 +190,12 @@ async fn build_request_context(
|
||||
context: &MemoryStartupContext,
|
||||
config: &Config,
|
||||
) -> StageOneRequestContext {
|
||||
let model_name = config
|
||||
.memories
|
||||
.extract_model
|
||||
.clone()
|
||||
.unwrap_or(crate::stage_one::MODEL.to_string());
|
||||
let model_name = config.memories.extract_model.clone().unwrap_or_else(|| {
|
||||
context
|
||||
.provider()
|
||||
.memory_extraction_preferred_model()
|
||||
.to_string()
|
||||
});
|
||||
context
|
||||
.stage_one_request_context(config, &model_name, crate::stage_one::REASONING_EFFORT)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user