Local Memories should work with custom / third-party model providers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
App and CLI
What feature would you like to see?
Local Codex Memories should work when the active model comes from a custom model_provider, not only from first-party ChatGPT / OpenAI models.
Memories can already be turned on ([features] memories = true, plus memories.generate_memories / memories.use_memories). The missing piece is first-class support for that pipeline on custom providers.
Today the write path is built around first-party OpenAI model IDs:
- Default memory extraction model is hardcoded
gpt-5.6-luna - Default memory consolidation model is hardcoded
gpt-5.6-terra - Only Amazon Bedrock overrides those preferred-model methods. Other custom providers inherit the OpenAI IDs.
memories.extract_model and memories.consolidation_model exist as overrides, but there is no provider-aware default that uses the active session model. If those overrides are unset, memory jobs are sent as gpt-5.6-luna / gpt-5.6-terra through whatever provider is active.
The pipeline also assumes first-party surfaces that a custom provider does not have, including a unary /v1/memories/trace_summarize call and an x-openai-memgen-request header on consolidation traffic.
What I would like:
- When the active provider is not first-party OpenAI, memory extraction and consolidation should default to the active session model, or to another model on that same provider — not to hardcoded ChatGPT model IDs.
- Memory use should work in threads that are running a custom-provider model the same way it does for ChatGPT models: inject and search the local
~/.codex/memoriesstore. - Generating and applying local memories should not require first-party-only APIs or headers.
In short: if Memories is enabled, a custom-provider session should both contribute to local memory and be able to use it.
Additional information
Related, but not the same request:
- #37009 — bug: the memory writer sends hardcoded
gpt-5.6-luna/gpt-5.6-terrato non-OpenAI providers. That is the silent-wrong-ID case. This issue is the product request: make Memories work end-to-end on custom providers. - #26808 — Chronicle / memory-writer model and cost controls (first-party Chronicle path).
- #31255, #31732, #36094 — same hardcoded-preferred-model class on the approval-review path (
codex-auto-review).
Official Computer History docs already say that feature is not available with an API key or Amazon Bedrock. This request is about the separate local Memories store under ~/.codex/memories, which is configurable on App and CLI but still assumes first-party models for generation.
I searched existing issues and did not find a feature request for Memories to work end-to-end with custom / third-party model providers. #37009 is the closest, and it is a bug about the default IDs rather than this product request.
Environment: Codex App 26.810.52044, CLI 0.147.0, macOS arm64. Memories feature enabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the local Memories extraction, consolidation, and use pipeline from the memories configuration keys and active model_provider selection. Check where gpt-5.6-luna, gpt-5.6-terra, /v1/memories/trace_summarize, and x-openai-memgen-request are applied. Done means custom-provider sessions can generate, apply, and search ~/.codex/memories without first-party-only models, APIs, or headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100