Skip to content

feat: add named provider matching for flexible provider lookup#106

Draft
ekg wants to merge 2 commits intomicrosoft:mainfrom
ekg:feat/named-provider-matching
Draft

feat: add named provider matching for flexible provider lookup#106
ekg wants to merge 2 commits intomicrosoft:mainfrom
ekg:feat/named-provider-matching

Conversation

@ekg
Copy link

@ekg ekg commented Feb 27, 2026

Summary

  • 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

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

  • CLI accepts provider name in -p flag
  • Banner shows config name instead of module ID
  • Delegation works with provider names

🤖 Generated with Amplifier

ekg added 2 commits February 19, 2026 08:31
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.
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