feat: register claude-code provider

This commit is contained in:
Ivanko1608
2026-10-25 02:04:22 +04:00
parent c41c5f3132
commit 2b2cf79b9a
3 changed files with 32 additions and 3 deletions
+4 -2
View File
@@ -34,6 +34,7 @@ import type {
} from "../core/contracts/models.ts";
import type { EffectiveModelSpec, EffectiveSlot } from "../core/settings-resolution.ts";
import { AUTH_PROVIDER_KEYS } from "../core/auth-keys.ts";
import { CLAUDE_CODE_PROVIDER } from "../agent/claude-code/constants.ts";
import { BACKGROUND_MODEL_ROLES, MODEL_SLOTS, type BackgroundModelRole, type ModelSlotName, type ModelsSettings } from "../core/settings.ts";
/** The picker's client-safe model entry (contract: core/contracts/models.ts). */
@@ -130,9 +131,10 @@ export function catalogProviders(): CatalogProvider[] {
/** The providers whose key is present — the picker federates exactly
* these (a keyless provider's models are unreachable by design; the
* Keys page is the discovery surface, same discipline as search). */
* Keys page is the discovery surface, same discipline as search), plus
* claude-code, which runs on the local CLI's subscription and takes no key. */
function keyedProviderIds(): Set<string> {
return new Set(catalogProviders().filter((p) => p.keyPresent).map((p) => p.id));
return new Set([...catalogProviders().filter((p) => p.keyPresent).map((p) => p.id), CLAUDE_CODE_PROVIDER]);
}
/** Project one catalog model to the client DTO. */