mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:20:44 +00:00
fix: add OpenCode Go DeepSeek V4 models
This commit is contained in:
@@ -528,6 +528,51 @@ describe("modelsListCommand forward-compat", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("includes provider-owned supplemental catalog rows with provider filters", async () => {
|
||||
mocks.resolveConfiguredEntries.mockReturnValueOnce({ entries: [] });
|
||||
mocks.loadModelRegistry.mockResolvedValueOnce({
|
||||
models: [],
|
||||
availableKeys: new Set(["opencode-go/deepseek-v4-pro"]),
|
||||
registry: {
|
||||
getAll: () => [],
|
||||
},
|
||||
});
|
||||
mocks.loadModelCatalog.mockResolvedValueOnce([
|
||||
{
|
||||
provider: "opencode-go",
|
||||
id: "deepseek-v4-pro",
|
||||
name: "DeepSeek V4 Pro",
|
||||
input: ["text"],
|
||||
contextWindow: 1_000_000,
|
||||
},
|
||||
]);
|
||||
mocks.resolveModelWithRegistry.mockImplementation(
|
||||
({ provider, modelId }: { provider: string; modelId: string }) =>
|
||||
provider === "opencode-go" && modelId === "deepseek-v4-pro"
|
||||
? {
|
||||
provider,
|
||||
id: modelId,
|
||||
name: "DeepSeek V4 Pro",
|
||||
api: "anthropic-messages",
|
||||
baseUrl: "https://opencode.ai/zen/go",
|
||||
input: ["text"],
|
||||
contextWindow: 1_000_000,
|
||||
maxTokens: 384_000,
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
}
|
||||
: undefined,
|
||||
);
|
||||
const runtime = createRuntime();
|
||||
|
||||
await modelsListCommand({ all: true, provider: "opencode-go", json: true }, runtime as never);
|
||||
|
||||
expect(lastPrintedRows<{ key: string }>()).toEqual([
|
||||
expect.objectContaining({
|
||||
key: "opencode-go/deepseek-v4-pro",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it("includes synthetic codex gpt-5.4 in --all output when catalog supports it", async () => {
|
||||
mocks.resolveConfiguredEntries.mockReturnValueOnce({ entries: [] });
|
||||
mocks.loadModelRegistry.mockResolvedValueOnce({
|
||||
|
||||
@@ -77,7 +77,7 @@ export async function appendAllModelRowSources(
|
||||
seenKeys,
|
||||
});
|
||||
|
||||
if (params.modelRegistry && !params.context.filter.provider) {
|
||||
if (params.modelRegistry) {
|
||||
await appendCatalogSupplementRows({
|
||||
rows: params.rows,
|
||||
modelRegistry: params.modelRegistry,
|
||||
|
||||
Reference in New Issue
Block a user