feat: implémentation et QA ticket99 - agent model configuration v2

- backend A-C: VO Codex/Claude, renderers/projecteurs modèle, SecretRef/env, catalogues/use cases/Tauri commands
- frontend D: profils Codex/Claude provider->model->secret, validations, conservation SecretRef
- fix: app-tauri embedded_server isolant IDEA_WEB_ROOT

QA: backend 57/57 tests, frontend 74/74 tests OK
This commit is contained in:
2026-07-26 11:56:25 +02:00
parent 13fb538880
commit dae07d35bb
27 changed files with 2358 additions and 143 deletions

View File

@ -1068,6 +1068,36 @@ export interface OpenCodeProviderConfig {
custom?: CustomProviderConfig;
}
/**
* Configuration for a Codex profile backed by a provider/model pair (ticket
* #99). `apiKeyRef` is an opaque backend SecretStore reference; the literal
* secret is only sent through {@link ProfileGateway.saveCodexProviderProfile}.
*/
export interface CodexProviderConfig {
/** Provider id used as Codex's `model_provider` (e.g. `"openai"`). */
providerId: string;
/** Model name written into Codex's isolated config. */
model: string;
/** Opaque reference to the sealed API key; never the literal key. */
apiKeyRef: string;
/** Optional custom OpenAI-compatible endpoint for this Codex provider. */
custom?: CodexCustomProviderConfig;
}
/**
* Configuration for a Claude profile backed by a provider/model pair (ticket
* #99). `apiKeyRef` is an opaque backend SecretStore reference; the literal
* secret is only sent through {@link ProfileGateway.saveClaudeProviderProfile}.
*/
export interface ClaudeProviderConfig {
/** Provider id. V1 backend exposes `"anthropic"`. */
providerId: string;
/** Model name written into Claude's isolated settings. */
model: string;
/** Opaque reference to the sealed API key; never the literal key. */
apiKeyRef: string;
}
/**
* Config for a custom OpenCode provider (mirror of the backend
* `CustomProviderConfig`, camelCase wire format), carried by
@ -1082,6 +1112,18 @@ export interface CustomProviderConfig {
displayName?: string;
}
/**
* Config for a custom Codex provider (mirror of the backend
* `CodexCustomProviderConfig`, camelCase wire format), carried by
* {@link CodexProviderConfig.custom}.
*/
export interface CodexCustomProviderConfig {
/** Base URL of the OpenAI-compatible endpoint. */
baseUrl: string;
/** Optional display label written into Codex's provider table. */
displayName?: string;
}
/**
* One entry of the static OpenCode cloud-provider catalogue (mirror of the
* backend `OpenCodeProviderDto`), returned by
@ -1096,6 +1138,28 @@ export interface OpenCodeProviderCatalogEntry {
models: string[];
}
/** One entry of the static Codex provider catalogue (ticket #99). */
export interface CodexProviderCatalogEntry {
/** Provider id used as Codex's `model_provider`. */
providerId: string;
/** Human-readable label for the picker UI. */
displayName: string;
/** Model names this provider serves, offered for selection. */
models: string[];
/** Whether this provider supports a custom endpoint in the UI. */
customSupported: boolean;
}
/** One entry of the static Claude provider catalogue (ticket #99). */
export interface ClaudeProviderCatalogEntry {
/** Provider id. V1 backend exposes `"anthropic"`. */
providerId: string;
/** Human-readable label for the picker UI. */
displayName: string;
/** Model names this provider serves, offered for selection. */
models: string[];
}
/**
* A declarative AI-CLI profile (mirror of the backend `AgentProfile`). `id` is a
* UUID string; `detect` is the optional detection command line.
@ -1132,6 +1196,10 @@ export interface AgentProfile {
* both.
*/
opencodeProvider?: OpenCodeProviderConfig;
/** Codex provider/model config (ticket #99). */
codexProvider?: CodexProviderConfig;
/** Claude provider/model config (ticket #99). */
claudeProvider?: ClaudeProviderConfig;
}
/** Availability of a candidate profile after detection (mirror of the DTO). */