fix(spawn): add pi to profile model flag resolution#132
Open
ruttybob wants to merge 1 commit intoHKUDS:mainfrom
Open
fix(spawn): add pi to profile model flag resolution#132ruttybob wants to merge 1 commit intoHKUDS:mainfrom
ruttybob wants to merge 1 commit intoHKUDS:mainfrom
Conversation
- Add "pi" to _model_flag() so --model is injected from profile.model - Add explicit pi entries in _base_url_env_var() and _api_key_target_env() (returning None — pi resolves these via --provider and provider-specific env) - Add 3 new tests: - pi model flag is injected from profile - pi model not duplicated when --model already in command - pi does not auto-inject base_url or api_key env vars Fixes a regression where OK Saved profile 'my-pi' would silently ignore the model because _model_flag() did not include pi.
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.
Summary
When a profile specifies
--agent pi --model X, the model is silently ignored because_model_flag()inprofiles.pydid not include"pi"in its agent set.Changes
clawteam/spawn/profiles.py— Add"pi"to_model_flag()so--modelis appended fromprofile.model. Add explicitreturn Noneentries for pi in_base_url_env_var()and_api_key_target_env()(pi resolves these via--providerand provider-specific env vars, not a single base-url/api-key env).tests/test_profiles.py— Add 3 new tests:test_apply_profile_pi_model_flag_is_injected— verifies--modelis appendedtest_apply_profile_pi_model_not_duplicated_when_already_present— verifies no double--modeltest_apply_profile_pi_no_base_url_or_api_key_env_injection— verifies pi does not auto-inject env varsTest Results
All 445 tests pass (2 skipped due to missing
mcpmodule, unrelated to this change):Usage Example