Skip to content

fix(core): M1 validated against real DeepSeek API + V4 model alias map#9

Merged
oratis merged 1 commit into
mainfrom
fix/m1-validation-real-api
May 28, 2026
Merged

fix(core): M1 validated against real DeepSeek API + V4 model alias map#9
oratis merged 1 commit into
mainfrom
fix/m1-validation-real-api

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented May 28, 2026

Summary

User provided a real DeepSeek API key. Used it to validate that M1's mock-based test fixtures actually match the real wire behavior of api.deepseek.com.

Result: everything works. The provider, agent loop, sessions, tool dispatch all run end-to-end against real DeepSeek. The biggest unknown from MORNING_REPORT.md is now closed.

Findings

  • ✓ Text streaming chunks match mockFetch fixtures exactly
  • ✓ Tool-call streaming with incremental arguments accumulation matches
  • deepseek-reasoner reasoning_content surfaces as thinking blocks + reasoning_tokens captured
  • ⚠️ DeepSeek has migrated to V4 family — /v1/models returns deepseek-v4-flash and deepseek-v4-pro. The classic names deepseek-chat / deepseek-reasoner remain as stable API aliases (still accepted), but we now also expose the V4 names in our DeepSeekModel type.

Changes

  • types.ts — expand DeepSeekModel union to 4 names with alias mapping comment
  • providers/deepseek.tsDEEPSEEK_MODELS table extended
  • providers/deepseek.live.test.ts — new live-API integration tests, opt-in via DEEPCODE_LIVE_TESTS=1
  • docs/m1-validation.md — formal validation report

Test plan

  • pnpm test — 217 passed, live tests properly skipped by default
  • DEEPCODE_LIVE_TESTS=1 pnpm --filter @deepcode/core test deepseek.live.test — 3 passed against real API

Release notes

  • release-notes:fix — corrects model names to match current API + adds validated invariants

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

…models

End-to-end validation 2026-05-28 with a real API key (since rotated):
  · /v1/models, /v1/chat/completions all reach
  · Text streaming + tool_calls increments + reasoning_content all match our
    mocked unit test fixtures exactly
  · Agent loop (provider → tool → result → finalize) runs against real model
  · deepseek-reasoner reasoning chunks flow into thinking ContentBlocks

Change
------
- types.ts                — DeepSeekModel union now includes deepseek-v4-flash /
                            deepseek-v4-pro (the actual current backing models
                            per /v1/models). The classic deepseek-chat /
                            deepseek-reasoner names remain as stable API
                            aliases.
- providers/deepseek.ts   — DEEPSEEK_MODELS table extended with the V4 entries
                            (all 4 share ctx 128k / maxOutput 8192).
- providers/deepseek.live.test.ts (new) — three live-API integration tests
                            (text streaming / tool_calls / reasoning_content),
                            opt-in via DEEPCODE_LIVE_TESTS=1. All three pass.
- docs/m1-validation.md   — formal validation report

Result: 217 default tests still pass (+ 3 live tests when DEEPCODE_LIVE_TESTS=1).

Verified
--------
  pnpm typecheck          → green
  pnpm test               → 217 passed / 1 skipped file / 7 skipped tests
                            (live tests deferred unless opted in)
  DEEPCODE_LIVE_TESTS=1 \
    pnpm --filter @deepcode/core test deepseek.live.test
                          → 3 passed (~6s, costs a few ¥0.001 of real tokens)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 5140897 into main May 28, 2026
@oratis oratis deleted the fix/m1-validation-real-api branch May 28, 2026 02:57
oratis added a commit that referenced this pull request Jun 1, 2026
…137)

The collapsed inspector rail now matches design spec screen #3 exactly:
‹ expand · ▤ Plan (pending badge) · ◐ Context · 📁 Recent files ·
ⓘ Session info · ⚙ Settings. The four middle icons are inspector hints —
clicking one expands the 320px panel and scrolls to that section (new
`focusSection` prop on InspectorPanel + `data-section` anchors).

The rail previously doubled as the *only* navigation to Permissions / MCP /
Plugins / Skills / About. Per spec screen #9 those live behind the ⚙ cog in a
shared Settings shell, so this adds <SettingsLayout> (a `.set-nav` left column
+ pane) and folds the settings-family screens into it — nothing is stranded.
Sessions stay in the left sidebar where the spec puts them.

- InspectorRail: trimmed to the 6 spec elements; onExpand(section) / onSettings
  / settingsActive replace the old screen-routing props.
- SettingsLayout + SETTINGS_FAMILY: unified nav for settings-family screens.
- App: expandInspector(section), settings-shell wrapping in renderScreen.
- index.css: `.settings-shell` / `.set-nav` / `.set-pane` per spec lines
  754-768; sticky `.inspector-head` so focused sections land below it.

Verified in a browser harness: rail = 48px with exactly ‹/▤(badge)/◐/📁/ⓘ/⚙,
panel = 320px, set-nav switches active screen, ⌘\ unchanged.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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