feat: add named provider matching for flexible provider lookup#106
Draft
ekg wants to merge 2 commits intomicrosoft:mainfrom
Draft
feat: add named provider matching for flexible provider lookup#106ekg wants to merge 2 commits intomicrosoft:mainfrom
ekg wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Allow providers to have a user-facing `name` field in settings.yaml
that the -p flag matches against before falling back to module name.
This enables more intuitive provider selection when the same module
(e.g., provider-openai) is configured for different services:
providers:
- name: openrouter
module: provider-openai
config:
base_url: https://openrouter.ai/api/v1
amplifier run -p openrouter "hello"
The name match is checked first; if no name matches, the existing
module-based lookup runs as before. Error messages now show both
name and module when available.
- commands/run.py: Match provider name field before module shorthand - effective_config.py: Show config name in banner instead of module ID - session_spawner.py: Flexible provider name lookup in spawner Enables using human-friendly provider names (e.g., 'anthropic') in addition to module names when specifying providers via CLI or delegation.
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
This enables using human-friendly provider names (e.g., 'openrouter') in addition to module names when specifying providers via CLI or delegation.
Context
Companion change to PR #17 on provider-openai which added _instance_name support for named provider instances.
Test plan
🤖 Generated with Amplifier