wxMaxima
Loading...
Searching...
No Matches
Data Fields
AiCustomProviderConfig Struct Reference

One user-added custom provider, as persisted in Configuration's AiCustomProvidersJson() (everything except the API key, which lives in the OS secret store, keyed by CustomProviderSecretService(id) – see AiProvider::SaveApiKey()/LoadApiKey()). More...

#include <AiProvider.h>

Data Fields

wxString id
 Stable, internally-generated identifier – never shown in the UI and never reused, so renaming a provider or two providers sharing a display name can't collide in the secret store or in Configuration::AiActiveCustomProviderId(). See NewAiCustomProviderId().
 
wxString name
 User-chosen display name, shown in the provider dropdown.
 
AiProviderShape shape = AiProviderShape::OpenAiCompatible
 
wxString baseUrl
 Full request URL for OpenAI-compatible/Anthropic shapes; for Google's shape, the part before "<model>:generateContent" (mirrors GoogleProvider::RequestUrl()).
 
wxString model
 
wxString username
 Username for HTTP Basic authentication, empty when none is needed.
 

Detailed Description

One user-added custom provider, as persisted in Configuration's AiCustomProvidersJson() (everything except the API key, which lives in the OS secret store, keyed by CustomProviderSecretService(id) – see AiProvider::SaveApiKey()/LoadApiKey()).

Field Documentation

◆ username

wxString AiCustomProviderConfig::username

Username for HTTP Basic authentication, empty when none is needed.

This is for a server put behind a Basic-auth reverse proxy – which is what Ollama's own documentation recommends for an instance reachable beyond localhost. It is deliberately kept here rather than in the secret store: a username is not a secret, and keeping it in the ordinary config is what lets the UI show which entries use Basic auth without unlocking a keyring.

When this is set, the entry's stored secret is used as the Basic password* rather than as a provider API key – there is one credential slot per provider, so the two are mutually exclusive. That covers the case this exists for (a local server with no API key of its own, fronted by a proxy that wants a password) and deliberately not the case of a keyed cloud provider behind a Basic proxy, which needs two separate secrets and so a second field to hold them.


The documentation for this struct was generated from the following file: