Skip to content

feat: 默认模型升级到 Opus 4.8 + 补充定价表#253

Merged
lishuceo merged 2 commits into
mainfrom
feat/claude-session-07dfb7
May 29, 2026
Merged

feat: 默认模型升级到 Opus 4.8 + 补充定价表#253
lishuceo merged 2 commits into
mainfrom
feat/claude-session-07dfb7

Conversation

@lishuceo
Copy link
Copy Markdown
Owner

Summary

  • 默认 model 从 `claude-opus-4-7` 切换到 `claude-opus-4-8`(src/config.ts)
  • `MODEL_PRICING` 表补一行 `claude-opus-4-8`(与 Opus 4.7/4.6 同价 $5/$25),避免落入 DEFAULT_PRICING fallback

背景

Anthropic API 已上线 `claude-opus-4-8`,直接调用返回正常。anycode 没有 model 白名单拦截,透传给 Agent SDK 即可生效;本 PR 仅做默认值切换 + 定价表对齐。

Test plan

  • `npx vitest run` — 1440/1441 通过,唯一失败 `memory/quality.test.ts > 当前工作重点` 为 pre-existing(在 main 分支上也失败,与本次改动无关)
  • 部署后通过飞书发条消息验证 `/info` 或日志中 model 字段为 `claude-opus-4-8`

🤖 Generated with Claude Code

- src/config.ts: 默认 model 从 claude-opus-4-7 切换到 claude-opus-4-8
- src/claude/executor.ts: MODEL_PRICING 表新增 claude-opus-4-8 条目 (与 Opus 4.7/4.6 同价 $5/$25)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Claude finished @lishuceo's task in 55s —— View job


✅ Approved — LGTM

Verdict: Small, well-scoped change. No issues found.

Review notes

  • src/claude/executor.ts:31 — New claude-opus-4-8 pricing entry uses the same numbers as 4.7/4.6/4.5 ($5 / $25 / $6.25 / $0.50), which matches the documented Opus pricing tier. Placement at the top of the table is consistent with newest-first ordering. ✅
  • src/config.ts:71-72 — Default model bumped to claude-opus-4-8 with the JSDoc comment kept in sync. Env override (CLAUDE_MODEL) still wins, so existing deployments are unaffected unless they were relying on the default. ✅
  • DEFAULT_PRICING still points at claude-opus-4-6 — this is fine as a fallback for unknown models since all 4.x Opus tiers share the same price. No change needed.
  • Out of scope (intentionally not touched): config/agents.example.json and tests still reference claude-opus-4-6 — those are fixtures / example configs, unrelated to the default-model bump.

Caveats

  • I can't independently verify claude-opus-4-8 exists in the Anthropic API from this review context (my own knowledge cutoff is Jan 2026, and the model isn't in my system prompt's list). Relying on the PR author's manual verification (直接调用返回正常). If a real-world smoke test (/info after deploy showing the new model in logs) hasn't happened yet, that test-plan checkbox is worth completing before merge.
  • The pre-existing failing test (memory/quality.test.ts > 当前工作重点) noted in the PR description is unrelated to this change — confirmed by reading the diff, neither touched file is in the memory module.

Checklist

  • Check previous review comments (none)
  • Read PR diff and changed files
  • Verify pricing table consistency
  • Verify default model change + comment alignment
  • Scan for stale references that should also update (none in scope)
    · Branch feat/claude-session-07dfb7

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Claude finished @lishuceo's task in 42s —— View job


✅ Approved — LGTM

Verdict: Small, well-scoped change. No new issues since the previous review; the synchronize event was triggered by a merge of main (commit 96e1949), not by substantive changes to the two diffed files.

Review notes

  • src/claude/executor.ts:31 — New claude-opus-4-8 row uses $5 / $25 / $6.25 / $0.50, identical to the other Opus 4.x tiers and matching Anthropic's documented Opus pricing. Placement at the top of the table preserves newest-first ordering. ✅
  • src/config.ts:71-72 — Default model bumped to claude-opus-4-8 with the JSDoc comment kept in sync. CLAUDE_MODEL env override still wins, so existing deployments are unaffected unless they relied on the default. ✅
  • DEFAULT_PRICING still points at claude-opus-4-6 — fine as a fallback since all 4.x Opus tiers share the same price. No change needed.
  • Out of scope (intentionally not touched): config/agents.example.json and tests still reference claude-opus-4-6. These are fixtures/example configs, unrelated to the default-model bump.

Caveats

  • I can't independently verify claude-opus-4-8 exists in the Anthropic API from this review context. Relying on the PR author's manual verification (直接调用返回正常). The unchecked test-plan item — smoke-testing /info (or log output) after deploy to confirm the model field shows claude-opus-4-8 — is worth completing before merge.
  • The pre-existing failing test (memory/quality.test.ts > 当前工作重点) noted in the PR description is unrelated to this change — neither touched file is in the memory module.

Checklist

  • Check previous review comments (none from claude[bot] on this PR's inline-comment thread)
  • Read CLAUDE.md for project context
  • Review diff and changed files
  • Verify pricing-table consistency and default-model change
  • Confirm synchronize event came from a merge, not new code

· Branch feat/claude-session-07dfb7 ·

@lishuceo lishuceo merged commit bcfb60c into main May 29, 2026
4 checks passed
@lishuceo lishuceo deleted the feat/claude-session-07dfb7 branch May 29, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant