Add more env vars and minor tweaks to the effort type definitions#2
Merged
Conversation
Adds CLAUDE_CODEX_PROXY_OPEN_AI_MODEL_OVERRIDE and
CLAUDE_CODEX_PROXY_OPEN_AI_EFFORT_OVERRIDE to force specific
model and effort settings across all proxy requests. Useful
when using agent-teams where the harness doesn't reliably
respect model/effort instructions.
Also expands the Effort type to include "none" and "xhigh"
to match the upstream Codex Responses API reasoning effort
values ("none", "low", "medium", "high", "xhigh").
Owner
|
Thanks. I did some changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds two new environment variables that I needed when using this proxy and also makes some minor changes to the type declaration of the
effort.Environment Variables
All of these were added based on my own usage of this proxy and based on my own needs. To elaborate a bit more, I use this proxy in conjunction with the agent-teams feature provided by the claude code harness. When using this feature it's very hard to instruct the team lead on what model to choose when spawning team mates and what effort level to set. Sadly, most of the time it looks like the model would just ignore these instructions as it looks like the tool that they use to spawn team mates doesn't give them this level of control over the models to use. I use gpt-5.4 with the claude code harness exclusively for the agent-teams feature and therefore I wanted to be able to completely override the selected model and effort level at a proxy level so that all requests, no matter what the selected model is, go to gpt-5.4 xhigh.
CLAUDE_CODEX_PROXY_OPEN_AI_MODEL_OVERRIDE- Allows for the proxy to override the selected model with the model provided in the environment variable.CLAUDE_CODEX_PROXY_OPEN_AI_EFFORT_OVERRIDE- Allows for the proxy to override the selected effort level with the effort level provided in the environment variable.Effort Type Definition
With the release of opus-4-7, claude now has an xhigh effort level. Due to that, I've redefined effort to be it's own type alias defined as follows: