Providers, keys and routing
Connect an AI provider, add more than one key, and choose which models your agents can use.
Where these settings live
On the host, open Settings → AI & agents. The Connections tab is the home for agent providers: the tools Lyre can launch (Claude Code, Codex, OpenCode, Copilot, Pi) and the accounts they use. Agent software installs and updates those tools. Routing decides how model requests are served and which models are enabled. Usage reports activity and allowance.
The tab names and controls depend on your installed host. A build may show only the gateway settings without the full routing controls. Compare what you see here with your release notes before assuming a control exists.
Add a provider
- Install the provider’s own command-line tool on the host, following that provider’s instructions.
- Sign in to it, or add its API key, where that provider requires one. Provider accounts, subscriptions and usage limits are separate from Lyre.
- Return to Settings → AI & agents → Connections and confirm the provider is listed and available.
- Start a small, read-only conversation against a project and confirm you get a reply before asking for file changes.
Adding a provider does not add a new adapter. Lyre supports the providers built into your host; a service with no adapter needs an integration, not just a key. See Coding providers and Build an integration.
Add more than one key
A provider can hold several named keys at once. Lyre tries them in order, so you can spread usage across accounts or plans, or keep a spare key for when another is rate-limited.
- Open Settings → AI & agents → Routing → Providers & keys.
- Choose Add key on the provider you want to extend. The same sheet handles a new provider and an extra key for one you already have.
- Give each key a Key name you will recognise, and paste the API key. Use Add another key to queue more than one row before saving.
- Save. Keys are written in the order shown, and the provider’s resolve order follows that order.
If part of a save fails, Lyre keeps the rows that did not save and retries only those; it does not duplicate a key that already saved. Editing an existing key shows a single focused form, and leaving the key field blank keeps the stored secret.
Keys travel through the host to the gateway and are never shown back to the client. Treat them as secrets: do not paste them into a project, a screenshot or a support thread.
Choose models and routes
Models & routes leads with the models that are actually enabled. A fresh host enables up to five by default; once you choose explicitly, your selection is kept, is not capped at five, and survives a refresh. Clearing every model on purpose shows an empty state rather than silently restoring the default.
- Search or filter the catalog by provider, and note the free-tier labels where they are known.
- Turn on the models you intend to use. Each enabled model becomes selectable in a conversation.
- Reopen the tab later to confirm your choice is still shown as enabled.
Behaving differently from the older default is expected: an older host may report that the selection is not enforced instead of inventing a five-model limit.
Check it works
- Start a conversation and pick one of the enabled models.
- Send a small prompt and confirm a reply arrives.
- If a key fails, check that provider’s quota and account status before adding or replacing keys.
Provider errors, a revoked key and a rate-limited key are different states. A rate-limited key becomes usable again when its window expires; a revoked key does not, and must be replaced.
The live routing map
Open Routing → Activity and expand Live routing map. It is a read-only view of recent gateway traffic: one node per provider and a moving edge for the route currently serving a request. View live map on Providers & keys switches to it.
The map refreshes while it is open and visible, and stops when you collapse it or leave the tab. A provider with no recent requests shows its connection health rather than implying a route.