



















@@ -38,11 +38,12 @@ describe("buildInlineProviderModels", () => {
3838const result = buildInlineProviderModels(providers);
39394040expect(result).toEqual([
41-expect.objectContaining({
42-id: "custom-model",
41+{
42+...makeModel("custom-model"),
4343provider: "custom",
4444baseUrl: "http://localhost:8000",
45-}),
45+api: undefined,
46+},
4647]);
4748});
4849@@ -58,11 +59,12 @@ describe("buildInlineProviderModels", () => {
5859const result = buildInlineProviderModels(providers);
59606061expect(result).toEqual([
61-expect.objectContaining({
62-id: "custom-model",
62+{
63+...makeModel("custom-model"),
6364provider: "custom",
65+baseUrl: "http://localhost:8000",
6466api: "anthropic-messages",
65-}),
67+},
6668]);
6769});
6870@@ -78,11 +80,12 @@ describe("buildInlineProviderModels", () => {
7880const result = buildInlineProviderModels(providers);
79818082expect(result).toEqual([
81-expect.objectContaining({
82-id: "custom-model",
83+{
84+...makeModel("custom-model"),
8385provider: "custom",
86+baseUrl: "http://localhost:8000",
8487api: "anthropic-messages",
85-}),
88+},
8689]);
8790});
8891@@ -134,11 +137,13 @@ describe("buildInlineProviderModels", () => {
134137const result = buildInlineProviderModels(providers);
135138136139expect(result).toEqual([
137-expect.objectContaining({
138-id: "claude-sonnet-4-6",
140+{
141+...makeModel("claude-sonnet-4-6"),
139142provider: "proxy",
143+baseUrl: "https://proxy.example.com",
144+api: "anthropic-messages",
140145headers: { "User-Agent": "custom-agent/1.0" },
141-}),
146+},
142147]);
143148});
144149此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。