fix(providers): align custom provider example with generated config

Correct the documented internal provider key and simplify import filtering while preserving native and legacy session selection.
This commit is contained in:
paseo-bot[bot]
2026-10-15 22:17:35 +02:00
parent ff21dc2315
commit acba926048
2 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -260,9 +260,9 @@ Paseo passes those variables through to the Codex app-server process **and** map
Under the hood, for each custom Codex provider Paseo injects this into Codex's config:
```toml
model_provider = "my-codex"
model_provider = "paseo:my-codex"
[model_providers.my-codex]
[model_providers."paseo:my-codex"]
name = "My Codex"
base_url = "https://custom-relay.example.com/v1"
wire_api = "responses"
@@ -7364,16 +7364,17 @@ export class CodexAppServerAgentClient implements AgentClient {
// unless told otherwise, lists only the provider its own config selects.
// Include legacy custom ids, but keep Codex built-in sessions separate.
const customProviderConfig = this.customProviderConfig();
let modelProviders: string[] | undefined;
if (customProviderConfig && this.deps.customProvider) {
modelProviders = [customProviderConfig.model_provider];
if (!CODEX_BUILTIN_MODEL_PROVIDER_IDS.has(this.deps.customProvider.id)) {
modelProviders.push(this.deps.customProvider.id);
}
}
const allThreads = await readCodexThreadWindow(client, this.logger, {
limit: listLimit,
cwd: options?.cwd,
...(customProviderConfig && this.deps.customProvider
? {
modelProviders: CODEX_BUILTIN_MODEL_PROVIDER_IDS.has(this.deps.customProvider.id)
? [customProviderConfig.model_provider]
: [customProviderConfig.model_provider, this.deps.customProvider.id],
}
: {}),
...(modelProviders ? { modelProviders } : {}),
});
const threads = filterCodexThreadsByCwd(allThreads, options?.cwd);
return threads.slice(0, limit).map((thread) => {