feat(frontend): provider OpenCode dynamique + saisie provider personnalisé (#92)
Le picker de provider OpenCode du first-run wizard consomme le catalogue dynamique exposé par le backend et propose une option « provider personnalisé » avec un formulaire de saisie libre (id + clé API) quand le provider souhaité n'y figure pas. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1015,6 +1015,26 @@ export interface OpenCodeProviderConfig {
|
||||
model: string;
|
||||
/** Opaque reference to the sealed API key; never the literal key. */
|
||||
apiKeyRef: string;
|
||||
/**
|
||||
* Additive config for a **custom** provider (endpoint outside the OpenCode
|
||||
* registry, ticket #92). Absent = known catalogue provider (unchanged
|
||||
* behaviour); present = arbitrary OpenAI-compatible endpoint.
|
||||
*/
|
||||
custom?: CustomProviderConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Config for a custom OpenCode provider (mirror of the backend
|
||||
* `CustomProviderConfig`, camelCase wire format), carried by
|
||||
* {@link OpenCodeProviderConfig.custom}.
|
||||
*/
|
||||
export interface CustomProviderConfig {
|
||||
/** AI SDK npm package used to talk to this provider (e.g. `"@ai-sdk/openai-compatible"`). */
|
||||
npm: string;
|
||||
/** Base URL of the OpenAI-compatible endpoint. */
|
||||
baseUrl: string;
|
||||
/** Optional display label for the model (defaults to the model id). */
|
||||
displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user