惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
雷峰网
雷峰网
罗磊的独立博客
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 司徒正美
Last Week in AI
Last Week in AI
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
宝玉的分享
宝玉的分享

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten litellm setup assertions · openclaw/opencla...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -5,6 +5,21 @@ import { capturePluginRegistration } from "openclaw/plugin-sdk/plugin-test-runti

55

import { describe, expect, it, vi } from "vitest";

66

import plugin from "./index.js";

778+

const LITELLM_DEFAULT_MODEL = {

9+

id: "claude-opus-4-6",

10+

name: "Claude Opus 4.6",

11+

reasoning: true,

12+

input: ["text", "image"],

13+

cost: {

14+

input: 0,

15+

output: 0,

16+

cacheRead: 0,

17+

cacheWrite: 0,

18+

},

19+

contextWindow: 128_000,

20+

maxTokens: 8_192,

21+

};

22+823

function registerProvider() {

924

const captured = capturePluginRegistration(plugin);

1025

const provider = captured.providers[0];

@@ -43,29 +58,48 @@ describe("litellm plugin", () => {

4358

toApiKeyCredential,

4459

} as never);

456046-

expect(result?.models?.providers?.litellm?.baseUrl).toBe("https://litellm.example/v1");

47-

expect(result?.models?.providers?.litellm?.api).toBe("openai-completions");

48-

expect(result?.auth?.profiles?.["litellm:default"]).toEqual({

61+

expect(result).toStrictEqual({

62+

auth: {

63+

profiles: {

64+

"litellm:default": {

65+

provider: "litellm",

66+

mode: "api_key",

67+

},

68+

},

69+

},

70+

agents: {

71+

defaults: {

72+

models: {

73+

"litellm/claude-opus-4-6": {

74+

alias: "LiteLLM",

75+

},

76+

},

77+

model: {

78+

primary: "litellm/claude-opus-4-6",

79+

},

80+

},

81+

},

82+

models: {

83+

mode: "merge",

84+

providers: {

85+

litellm: {

86+

baseUrl: "https://litellm.example/v1",

87+

api: "openai-completions",

88+

models: [LITELLM_DEFAULT_MODEL],

89+

},

90+

},

91+

},

92+

});

93+

expect(resolveApiKey).toHaveBeenCalledWith({

4994

provider: "litellm",

50-

mode: "api_key",

95+

flagValue: "litellm-test-key",

96+

flagName: "--litellm-api-key",

97+

envVar: "LITELLM_API_KEY",

5198

});

52-

expect(result?.agents?.defaults?.model).toMatchObject({

53-

primary: "litellm/claude-opus-4-6",

99+

expect(toApiKeyCredential).toHaveBeenCalledWith({

100+

provider: "litellm",

101+

resolved: { key: "litellm-test-key", source: "flag" },

54102

});

55-

expect(resolveApiKey).toHaveBeenCalledWith(

56-

expect.objectContaining({

57-

provider: "litellm",

58-

flagValue: "litellm-test-key",

59-

flagName: "--litellm-api-key",

60-

envVar: "LITELLM_API_KEY",

61-

}),

62-

);

63-

expect(toApiKeyCredential).toHaveBeenCalledWith(

64-

expect.objectContaining({

65-

provider: "litellm",

66-

resolved: { key: "litellm-test-key", source: "flag" },

67-

}),

68-

);

69103

} finally {

70104

rmSync(agentDir, { recursive: true, force: true });

71105

}