fix(paseo-agent): support empty model-provider setup

Allow catalog provider setup to persist credentials before explicit model overrides exist, while keeping unrelated provider snapshots warmable after Paseo Agent config changes.
This commit is contained in:
Mohamed Boudra
2026-07-02 13:12:23 +02:00
parent d6e4e5f3ce
commit 5d67032ef6
17 changed files with 441 additions and 209 deletions
@@ -19,6 +19,20 @@ describe("Paseo Agent config RPC schemas", () => {
expect(parsed.providerType).toBe("openrouter");
});
test("parses provider config requests without model overrides", () => {
const parsed = SessionInboundMessageSchema.parse({
type: "config.paseo_agent.set_provider.request",
requestId: "req-set-openrouter",
name: "openrouter",
providerType: "openrouter",
options: {
apiKey: "sk-test",
},
});
expect(parsed.options.models).toBeUndefined();
});
test("parses a provider type this client has never heard of (new daemon, old client)", () => {
const parsed = SessionOutboundMessageSchema.parse({
type: "config.paseo_agent.get_providers.response",
+1 -1
View File
@@ -1946,7 +1946,7 @@ const PaseoAgentSetProviderOptionsSchema = z
api: z.string().min(1).optional(),
headers: z.record(z.string(), z.string()).optional(),
authHeader: z.boolean().optional(),
models: z.array(PaseoAgentProviderModelConfigSchema).min(1),
models: z.array(PaseoAgentProviderModelConfigSchema).min(1).optional(),
})
.strict();