Skip to content

Allow the Claude model to be set from the environment - #15

Merged
s0undsystem merged 1 commit into
mainfrom
feat/claude-model-env-override
Aug 5, 2026
Merged

Allow the Claude model to be set from the environment#15
s0undsystem merged 1 commit into
mainfrom
feat/claude-model-env-override

Conversation

@s0undsystem

Copy link
Copy Markdown
Owner

LocalBrain already reads its model from DLPAC_LOCAL_MODEL, but ClaudeBrain's model was 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 for symmetry with the local backend, and moves the default into a single DEFAULT_CLAUDE_MODEL constant so the ID is not duplicated between the class signature and make_brain. Model lineups move, and an ID pinned in two places goes stale in one of them.

Precedence:

Source Wins
explicit model= argument 1st
DLPAC_CLAUDE_MODEL 2nd
DEFAULT_CLAUDE_MODEL fallback

Verified all three resolve correctly. 13/13 compiler tests, 12/12 assistant tests. README updated.

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.
@s0undsystem
s0undsystem merged commit 0dd1a3c into main Aug 5, 2026
1 of 2 checks passed
@s0undsystem
s0undsystem deleted the feat/claude-model-env-override branch August 5, 2026 01:47
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