Skip to content

feat(api/ui): set provider and model atomically#2717

Open
tusharmath wants to merge 2 commits intomainfrom
atomic-model-provider
Open

feat(api/ui): set provider and model atomically#2717
tusharmath wants to merge 2 commits intomainfrom
atomic-model-provider

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines 521 to 529
Provider {
/// Provider ID to set as default.
provider: ProviderId,

/// Optional model ID to set simultaneously, skipping interactive model
/// selection.
/// selection. When omitted, an interactive prompt is shown.
#[arg(long)]
model: Option<ModelId>,
},
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model and provider are both required while setting model.

# Action handler: Select model (across all configured providers)
# When the selected model belongs to a different provider, switches it first.
# Always calls `forge config set provider <provider_id> --model <model_id>` on selection.
function _forge_action_model() {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify this logic to simply trigger forge config set model

Which should open the Rust implementation of interactive model setting.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to also drop :provider and use it as an alias to :login which should triggeer forge provider login without any params.

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