Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/clients/config-export/zcode-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface ZcodeStoreProviderRule {
providerName: string;
config: {
group: string;
access: { apiKey: string };
access: { type: "api-key"; apiKey: string };
api: { type: string; baseUrl: string };
personalModelIds: string[];
modelOrder: string[];
Expand Down Expand Up @@ -113,7 +113,7 @@ export function buildZcodeStoreProviderRule(ctx: ExportContext): ZcodeStoreProvi
providerName: ZCODE_STORE_PROVIDER_NAME,
config: {
group: ZCODE_STORE_PROVIDER_GROUP,
access: { apiKey: LOOPBACK_API_KEY_PLACEHOLDER },
access: { type: "api-key", apiKey: LOOPBACK_API_KEY_PLACEHOLDER },
api: { type: ZCODE_STORE_API_TYPE, baseUrl: `${ctx.baseUrl.replace(/\/v1\/?$/, "")}/v1` },
personalModelIds: ids,
/*
Expand Down
3 changes: 3 additions & 0 deletions tests/clients/integrations-current-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ZCODE_STORE_PROVIDER_RULES_PATH,
ZCODE_STORE_SCHEMA_VERSION,
buildZcodeStoreProviderRule,
type ZcodeStoreProviderRule,
type ExportModel,
} from "../../src/clients/config-export";
import { formatSelectorConjunction } from "../../src/integrations/merge";
Expand Down Expand Up @@ -136,6 +137,8 @@ describe("writing the provider store the client reads", () => {
// so the base URL is the one `ocx export` composes rather than a literal.
expect(readPath(readStore(), OUR_PROVIDER_RULE))
.toEqual(buildZcodeStoreProviderRule(exportContextOf(input())));
const writtenRule = readPath(readStore(), OUR_PROVIDER_RULE) as ZcodeStoreProviderRule;
expect(writtenRule.config.access.type).toBe("api-key");
expect(readPath(readStore(), ourModelRule("anthropic/claude-opus-4-8")))
.toMatchObject({ config: { properties: { contextWindow: 200_000 } } });
// And nothing was written to the file it stopped reading.
Expand Down
Loading