feat(coding-agent): add provider display names

closes #3956
This commit is contained in:
Mario Zechner
2026-04-30 00:10:38 +02:00
parent b79e7f8058
commit cf5ec23240
10 changed files with 110 additions and 40 deletions

View File

@@ -41,6 +41,7 @@ export default function (pi: ExtensionAPI) {
// Register new provider with models
pi.registerProvider("my-provider", {
name: "My Provider",
baseUrl: "https://api.example.com",
apiKey: "MY_API_KEY",
api: "openai-completions",
@@ -544,6 +545,9 @@ Run tests with your provider/model pairs to verify compatibility.
```typescript
interface ProviderConfig {
/** Display name for the provider in UI such as /login. */
name?: string;
/** API endpoint URL. Required when defining models. */
baseUrl?: string;

View File

@@ -1515,6 +1515,7 @@ If you need to discover models from a remote endpoint, prefer an async extension
```typescript
// Register a new provider with custom models
pi.registerProvider("my-proxy", {
name: "My Proxy",
baseUrl: "https://proxy.example.com",
apiKey: "PROXY_API_KEY", // env var name or literal
api: "anthropic-messages",
@@ -1561,6 +1562,7 @@ pi.registerProvider("corporate-ai", {
```
**Config options:**
- `name` - Display name for the provider in UI such as `/login`.
- `baseUrl` - API endpoint URL. Required when defining models.
- `apiKey` - API key or environment variable name. Required when defining models (unless `oauth` provided).
- `api` - API type: `"anthropic-messages"`, `"openai-completions"`, `"openai-responses"`, etc.