Allow the Claude model to be set from the environment - #15
Merged
Conversation
LocalBrain already takes its model from DLPAC_LOCAL_MODEL, while ClaudeBrain had its model reachable only by passing model= in code. Anyone whose API access does not include the default had no way to point the backend at a model they can actually reach without editing the source. Adds DLPAC_CLAUDE_MODEL, matching how the local backend already works, and moves the default into a single DEFAULT_CLAUDE_MODEL constant so the ID is not repeated between the class signature and make_brain. Precedence is explicit argument, then environment, then default.
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.
LocalBrainalready reads its model fromDLPAC_LOCAL_MODEL, butClaudeBrain's model was reachable only by passingmodel=in code. Anyone whose API access does not include the default had no way to point the backend at a model they can actually reach without editing the source.Adds
DLPAC_CLAUDE_MODELfor symmetry with the local backend, and moves the default into a singleDEFAULT_CLAUDE_MODELconstant so the ID is not duplicated between the class signature andmake_brain. Model lineups move, and an ID pinned in two places goes stale in one of them.Precedence:
model=argumentDLPAC_CLAUDE_MODELDEFAULT_CLAUDE_MODELVerified all three resolve correctly. 13/13 compiler tests, 12/12 assistant tests. README updated.