Request headers for preset providers, and more than one of a preset (#50)
-
Headers on presets. Providers created from a preset can now carry their own request headers too, and keep the preset's endpoints, icon and model catalog. The editor suggests the headers the vendor documents, but you fill in the values:
- Anthropic:
anthropic-workspace-id, for a key that can reach several workspaces. - OpenRouter:
HTTP-RefererandX-OpenRouter-Title, for app attribution.
A suggested header you leave empty isn't sent.
- Anthropic:
-
Add another. An added preset's editor has Add another {name}. It creates one more provider of that preset with its own name, id (
anthropic-2, or one from the name you give), key, headers and models. On the command line,magpie provider add anthropic sk-… header.anthropic-workspace-id=… [id=… name=…]does the same.- Adding the same key with the same headers again is refused, since that provider is already there.
- To change a provider's key, use
magpie provider key <id> <key>.
-
Imports. Codex and Alma imports keep a preset's headers. An entry whose headers differ from the provider already there is imported as a second provider of that preset, and it stays that preset.