An agent needs a model provider to run. The providers sheet shows which ones the agent server already has and lets the person add another by entering an API key. Its screen component is AgentProvidersScreen.
At a glance
Tab | Agents |
Route |
|
Presentation | Sheet ( |
Title | Inline "Model providers" |
How you get here | "Model providers" on the Agents list or in the New agent sheet |
Where it leads | Back to where it was opened |
Anatomy
Navigation bar. The title "Model providers" and one trailing action, "Done". There is no "Cancel": nothing here is pending until "Save provider" is tapped.
Section "Configured". One provider row per provider: its name in -exact-headline and its type in -exact-footnote, secondary colour, with " · subscription" appended for a subscription sign in. These rows are not tappable.
Section "Add a provider".
"Type" with a menu on the right (a select) listing the provider types the server supports.
The provider name field, placeholder "Provider name". It starts as "Anthropic" and follows the type's label until the person edits it.
The address: for hosted types, the fixed endpoint as read only footnote text (for example "https://api.anthropic.com"); for types with an editable address, a field with placeholder "Base URL" prefilled with the type's default (for example "http://localhost:11434/v1" for Ollama).
The key field, hidden as a password, placeholder "API key" or "API key (optional)".
The row "Save provider".
Footer: "Subscription sign-in is available on desktop. Keys are sent only to HTTPS or a local server."
An error section after a failed save, in -exact-system-red.
States
State | What is shown |
|---|---|
None configured | "No providers configured yet." in secondary colour under "Configured" |
Incomplete | "Save provider" is disabled until there is a name, a key when the type requires one, and an address when the type shows one |
Unsafe server | When the agent server is remote plain HTTP: the red line "This server uses remote HTTP. Use HTTPS before sending an API key.", and "Save provider" is disabled whenever a key is typed |
Saving | "Save provider" is disabled |
Failed | The error section, for example "Enter an API key." |
Actions
Action | Result |
|---|---|
Change "Type" | Updates the name (if untouched), resets the address to the type's default and clears the key |
Tap "Save provider" | Saves. On success the sheet closes and the provider appears in the lists that use it |
Tap "Done" | Closes the sheet |
Components used
Component | Kind | What it does here |
|---|---|---|
Inline part | The configured provider rows | |
Primitive | The inset grouped sheet body | |
Primitive | The bar, section headers, the form's footer | |
Primitive | "Done" and "Save provider" | |
Primitive | The type | |
Primitive | Row text, the endpoint, warnings and errors | |
Primitive | The "Type" row and the two line provider rows |
Why it is designed this way
List above, form below. The person first sees what exists, then the way to add. Both fit one sheet, so there is no second level of navigation for a four field form (inferred).
The form adapts to the type. Only what the chosen type needs is editable. A hosted provider's address is shown but fixed, so the person can see where the key will go without being able to mistype it.
The key is protected in the design, not only in code. The field is a password field, the footer states where keys are sent, and on an unsafe server the screen refuses to save a key and says why. This is Honest state applied to a security rule.
Desktop only features are said, not hidden. Subscription sign in is not offered on mobile, and the footer says where it is (Voice and wording).
"Save provider" is an in list button row. The bar keeps a single "Done" because the sheet is also a viewer. The row's title is set to the label colour in the contract, so it reads as a form row and not as a tinted link (Buttons and actions).
The older screenshot final/ios-agent-providers-light.png shows raw type ids ("anthropic", "custom") and a "Base URL (optional)" field. The code now shows the type's label and a fixed endpoint, as in the screenshots above.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-AGENT-03 Set up a model provider: The sheet: configured providers above, the add form below
US-AGENT-04 Create an agent: Where the no provider notice sends the person
US-APP-09 Know the app only reaches what it must: The key safety rule for provider keys
Related
Parent: Agents tab screens. Neighbours: New agent sheet, Agent server sheet.
Patterns: Forms and inputs, Lists. Structure: Stacks, pushes and sheets.
Implementation: Agents: providers, models and tool summaries, Agents: screens and components.
Source: agents.contract lines 719 to 818.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime