Skip to content

Respect openai-codex modelOverrides when MultiCodex mirrors provider metadata - #1

Open
garizs wants to merge 2 commits into
victor-software-house:mainfrom
garizs:fix-openai-codex-model-overrides
Open

Respect openai-codex modelOverrides when MultiCodex mirrors provider metadata#1
garizs wants to merge 2 commits into
victor-software-house:mainfrom
garizs:fix-openai-codex-model-overrides

Conversation

@garizs

@garizs garizs commented Apr 18, 2026

Copy link
Copy Markdown

This fixes a bug where MultiCodex mirrors the built-in openai-codex model metadata but does not preserve the user's ~/.pi/agent/models.json modelOverrides for openai-codex.

Problem:
When MultiCodex registers itself as the openai-codex provider, it copies mirrored model fields from the built-in provider. User overrides such as contextWindow, maxTokens, name, reasoning, input, and cost can then be lost after the provider takeover.

Fix:
Read openai-codex modelOverrides from the active Pi agent directory and reapply them to the mirrored model definitions before registering the provider.

Notes:

  • This keeps MultiCodex aligned with the effective built-in provider configuration.
  • Issues appear to be disabled on the upstream repo, so I could not open a matching issue first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant