fix(cli): honor --model flag in interactive mode#111
Open
richardSHkim wants to merge 1 commit intohuggingface:mainfrom
Open
fix(cli): honor --model flag in interactive mode#111richardSHkim wants to merge 1 commit intohuggingface:mainfrom
richardSHkim wants to merge 1 commit intohuggingface:mainfrom
Conversation
The flag was forwarded to headless_main but dropped on the interactive path: cli() called main() with no args, main() had no model parameter, and print_banner had a hardcoded fallback that displayed bedrock/us.anthropic.claude-opus-4-6-v1 regardless of config. Plumb args.model through main() and pass config.model_name to the banner so both the actual model and the displayed model match the CLI flag.
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
--model Xwas honored in headless mode but silently dropped in the interactive REPL. Two stacked issues:cli()calledmain()with no args (agent/main.py:1245);main()had nomodelparameter, soargs.modelwas discarded andconfig.model_namealways came fromconfigs/main_agent_config.json.print_bannerwas called beforeload_configand without amodelargument (agent/main.py:831), so it always rendered the hardcoded fallback atagent/utils/terminal_display.py:102("bedrock/us.anthropic.claude-opus-4-6-v1").Repro
Fix
modelinmain()and overrideconfig.model_nameafterload_config(...)— same pattern asheadless_main(agent/main.py:1051-1054).load_configaboveprint_bannerand passmodel=config.model_nameso the banner reflects the resolved model.