Skip to content

Command-line overrides doesn't work for CLI #245

@linhaowei1

Description

@linhaowei1

It seems that

        if args.api_base:
            config.llm.api_base = args.api_base
            print(f"Using API base: {config.llm.api_base}")

        if args.primary_model:
            config.llm.primary_model = args.primary_model
            print(f"Using primary model: {config.llm.primary_model}")

        if args.secondary_model:
            config.llm.secondary_model = args.secondary_model
            print(f"Using secondary model: {config.llm.secondary_model}")

The current code in cli.py doesn't correctly update the list of models. Although the primary_model and secondary_model are set from command-line arguments, this happens after the config object has already initialized its models list with default values in the __post_init__() method. This means the application will always use the default models instead of the ones specified by the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions