Skip to content

fix(cli): honor --model flag in interactive mode#111

Open
richardSHkim wants to merge 1 commit intohuggingface:mainfrom
richardSHkim:fix/cli-model-flag-interactive
Open

fix(cli): honor --model flag in interactive mode#111
richardSHkim wants to merge 1 commit intohuggingface:mainfrom
richardSHkim:fix/cli-model-flag-interactive

Conversation

@richardSHkim
Copy link
Copy Markdown

Summary

--model X was honored in headless mode but silently dropped in the interactive REPL. Two stacked issues:

  1. cli() called main() with no args (agent/main.py:1245); main() had no model parameter, so args.model was discarded and config.model_name always came from configs/main_agent_config.json.
  2. print_banner was called before load_config and without a model argument (agent/main.py:831), so it always rendered the hardcoded fallback at agent/utils/terminal_display.py:102 ("bedrock/us.anthropic.claude-opus-4-6-v1").

Repro

ml-intern --model openai/qwen3-235b
# banner: Model: bedrock/us.anthropic.claude-opus-4-6-v1   (wrong)

ml-intern --model openai/qwen3-235b "hi"
# banner: Model: openai/qwen3-235b                          (correct)

Fix

  • Accept model in main() and override config.model_name after load_config(...) — same pattern as headless_main (agent/main.py:1051-1054).
  • Move load_config above print_banner and pass model=config.model_name so the banner reflects the resolved model.

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.
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