Skip to content

feat: inject _instance_name from provider name field into config#23

Draft
ekg wants to merge 1 commit intomicrosoft:mainfrom
ekg:feat/named-provider-instances
Draft

feat: inject _instance_name from provider name field into config#23
ekg wants to merge 1 commit intomicrosoft:mainfrom
ekg:feat/named-provider-instances

Conversation

@ekg
Copy link

@ekg ekg commented Feb 27, 2026

Summary

  • amplifier_core/session.py: Inject _instance_name from provider name field into config before loading the provider

When the provider config has a 'name' field (from settings.yaml), inject it as '_instance_name' into the provider config before loading. This enables named provider instances where the same module (e.g., provider-openai) can be used for multiple services (openrouter, deepseek, etc.) with different names.

Context

Companion to PR #17 on provider-openai which added _instance_name support for named provider instances.

Test plan

  • Provider with name field gets _instance_name injected
  • Provider without name field falls back to module ID
  • Multiple providers with same module but different names work correctly

🤖 Generated with Amplifier

When the provider config has a 'name' field (from settings.yaml),
inject it as '_instance_name' into the provider config before loading.
This enables named provider instances where the same module
(e.g., provider-openai) can be used for multiple services
(openrouter, deepseek, etc.) with different names.

Companion to PR microsoft#17 on provider-openai which added _instance_name
support for named provider instances.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
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