fix(catalog): restore DeepSeek V4 context window on routed rebuilds - #1226
Conversation
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughDeepSeek V4 now uses the ChangesDeepSeek Jawcode metadata
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/providers/registry.ts`:
- Around line 1296-1300: Update the DeepSeek registry entry around jawcodeBundle
and models to reconcile the outdated dates and identifiers: use a verification
date that has already occurred, and remove deepseek-chat/deepseek-reasoner
unless compatibility aliases are confirmed supported; if retaining them,
document the explicit post-deprecation compatibility reason. Ensure the current
offerings use deepseek-v4-flash and deepseek-v4-pro as appropriate.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1a502224-4de9-4f42-8086-ea8408a1d09a
⛔ Files ignored due to path filters (1)
src/generated/jawcode-model-metadata.tsis excluded by!**/generated/**
📒 Files selected for processing (4)
scripts/generate-jawcode-metadata.tssrc/providers/registry.tstests/codex-catalog.test.tstests/provider-registry-parity.test.ts
07b7e42 to
ad4459a
Compare
Rate Limit Exceeded
|
Rate Limit Exceeded
|
Rate Limit Exceeded
|
Rate Limit Exceeded
|
Rate Limit Exceeded
|
Rate Limit Exceeded
|
Ingwannu
left a comment
There was a problem hiding this comment.
The underlying fix is still valuable: current dev still has the DeepSeek V4 context values at 1,000,000 and the direct DeepSeek registry entry does not select the deepseek metadata bundle. However, this branch now conflicts with dev, and the metadata pipeline changed after the PR was built. scripts/generate-jawcode-metadata.ts and src/generated/jawcode-model-metadata.ts were replaced by the vendored scripts/model-metadata.source.json -> scripts/generate-model-metadata.ts -> src/generated/model-metadata.ts pipeline, with a byte-for-byte sync guard.\n\nPlease rebase onto current dev, update the vendored source/registry rather than the retired generated paths, regenerate with bun run generate:model-metadata, and keep the focused routed-catalog regression plus tests/model-metadata-sync.test.ts green. I am requesting changes because the current conflicting branch cannot be merged safely, not because the reported context-cap issue is invalid.
DeepSeek routed models were rebuilt with a 128k context window after
every sync because the registry entry had no jawcodeBundle, so the
catalog metadata restore step could not resolve the provider and the
strict-fields fallback overwrote the window. Users who saved the
provider under a title-cased key ("DeepSeek") also missed the alias
table, which was case-sensitive.
Add jawcodeBundle: "deepseek" to the registry entry and fold provider
case in resolveJawcodeProvider, then regenerate the metadata snapshot
with the official 1,048,576-token window for both V4 models. Routed
deepseek entries now restore 1,048,576 instead of the 128k fallback.
deepseek-chat/deepseek-reasoner were deprecated upstream on 2026-07-24 15:59 UTC and official identifiers are now deepseek-v4-flash/deepseek-v4-pro. The aliases stay in the registry only as compatibility aliases so existing saved configs and requests keep validating and routing; the comment now documents that post-deprecation reason instead of a stale future-dated note.
…a pipeline The metadata pipeline was de-jawcoded upstream: the bundled snapshot now lives at scripts/model-metadata.source.json and generates src/generated/model-metadata.ts. Move the DeepSeek V4 context-window fix onto that pipeline (1048576 for flash and pro per DeepSeek's official Codex setup docs) and regenerate the committed output so routed rebuilds stop falling back to the 128k strict-fields default.
ad4459a to
8a80428
Compare
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Current commit ---'
git rev-parse HEAD
printf '%s\n' '--- Relevant file outlines ---'
ast-grep outline src/codex/catalog/parsing.ts --items all --match 'JAWCODE|Routed' --view expanded
ast-grep outline src/codex/catalog/provider-fetch.ts --items all --match 'augmentRoutedModelsWithJawcodeMetadata' --view expanded
printf '%s\n' '--- Allowlist, guard, and augmentation implementation ---'
rg -n -C 16 -P '\bJAWCODE_CATALOG_AUGMENT_PROVIDERS\b|\baugmentRoutedModelsWithJawcodeMetadata\s*\(' \
src/codex/catalog tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- DeepSeek augmentation regression coverage ---'
rg -n -C 20 -P 'augmentRoutedModelsWithJawcodeMetadata\s*\(\s*\[\s*\]\s*,\s*\[\s*["'\'']deepseek["'\'']\s*\]|deepseek-v4-(flash|pro)|1_048_576' \
tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- Relevant current change ---'
git diff --unified=30 HEAD^ HEAD -- \
src/codex/catalog/parsing.ts \
src/codex/catalog/provider-fetch.ts \
tests/codex-catalog.test.ts \
src/providers/registry.tsLength of output: 47660
High priority — Add
export const JAWCODE_CATALOG_AUGMENT_PROVIDERS = new Set(["opencode-go"]);
Therefore, if DeepSeek
Update the allowlist: export const JAWCODE_CATALOG_AUGMENT_PROVIDERS = new Set([
"opencode-go",
"deepseek",
]);Add a regression test that calls the augmentation function with You are interacting with an AI system. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Current revision ---'
git rev-parse HEAD
printf '%s\n' '--- Allowlist and augmentation guard ---'
rg -n -C 12 -P \
'\bJAWCODE_CATALOG_AUGMENT_PROVIDERS\b|\baugmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(' \
src/codex/catalog tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- DeepSeek empty-discovery augmentation coverage ---'
rg -n -C 16 -i -P \
'augmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(\s*\[\s*\]\s*,\s*\[\s*["'\'']deepseek["'\'']\s*\]|deepseek-v4-(flash|pro)|1_048_576' \
tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- Relevant PR-range changes ---'
git diff --unified=30 HEAD^ HEAD -- \
src/codex/catalog/parsing.ts \
src/codex/catalog/provider-fetch.ts \
tests/codex-catalog.test.ts \
src/providers/registry.tsLength of output: 46834
export const JAWCODE_CATALOG_AUGMENT_PROVIDERS = new Set(["opencode-go"]);
If DeepSeek
Update the allowlist to include You are interacting with an AI system. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/codex-catalog.test.ts`:
- Around line 2829-2847: Add "deepseek" to the JAWCODE_CATALOG_AUGMENT_PROVIDERS
allowlist so metadata augmentation runs for DeepSeek. In the DeepSeek catalog
tests, add a regression case invoking augmentRoutedModelsWithMetadata([],
["deepseek"]) and assert both V4 models are restored with 1_048_576 context and
max-context windows plus text-only input modalities.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 78bed41f-920b-415f-8bf4-24faa731be16
⛔ Files ignored due to path filters (1)
src/generated/model-metadata.tsis excluded by!**/generated/**
📒 Files selected for processing (5)
scripts/generate-model-metadata.tsscripts/model-metadata.source.jsonsrc/providers/registry.tstests/codex-catalog.test.tstests/provider-registry-parity.test.ts
💤 Files with no reviewable changes (1)
- scripts/model-metadata.source.json
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Current revision ---'
git rev-parse HEAD
printf '%s\n' '--- Relevant structure ---'
ast-grep outline src/codex/catalog/parsing.ts --items all --match 'JAWCODE|Routed' --view expanded
ast-grep outline src/codex/catalog/provider-fetch.ts --items all --match 'augmentRoutedModelsWith' --view expanded
printf '%s\n' '--- Allowlist and augmentation guard ---'
rg -n -C 16 -P '\bJAWCODE_CATALOG_AUGMENT_PROVIDERS\b|\baugmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(' \
src/codex/catalog tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- DeepSeek augmentation regression coverage ---'
rg -n -C 20 -i -P 'augmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(\s*\[\s*\]\s*,\s*\[\s*["'\'']deepseek["'\'']\s*\]|deepseek-v4-(flash|pro)|1_048_576' \
tests/codex-catalog.test.ts -g '*.ts'
printf '%s\n' '--- Relevant current diff ---'
git diff --unified=30 HEAD^ HEAD -- \
src/codex/catalog/parsing.ts \
src/codex/catalog/provider-fetch.ts \
tests/codex-catalog.test.ts \
src/providers/registry.tsLength of output: 55492
High priority — Add
export const JAWCODE_CATALOG_AUGMENT_PROVIDERS = new Set(["opencode-go"]);
Therefore, if DeepSeek
Update the allowlist to include You are interacting with an AI system. |
…ty list Add deepseek to the catalog augmentation allowlist so metadata-sourced V4 rows are appended when live discovery returns nothing, and cover the empty-discovery path with a regression test asserting the official 1,048,576 context window, auto-compact limit, and text-only input.
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Current revision ---'
git rev-parse HEAD
printf '%s\n' '--- Allowlist and augmentation implementation ---'
rg -n -C 14 -P \
'\bJAWCODE_CATALOG_AUGMENT_PROVIDERS\b|\baugmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(' \
src/codex/catalog \
-g '*.ts'
printf '%s\n' '--- DeepSeek empty-discovery coverage ---'
rg -n -C 18 -i -P \
'augmentRoutedModelsWith(?:Jawcode)?Metadata\s*\(\s*\[\s*\]\s*,\s*\[\s*["'\'']deepseek["'\'']\s*\]|deepseek-v4-(flash|pro)|1_048_576' \
tests/codex-catalog.test.ts \
-g '*.ts'
printf '%s\n' '--- Changes in relevant files at current commit ---'
git diff --unified=30 HEAD^ HEAD -- \
src/codex/catalog/parsing.ts \
src/codex/catalog/provider-fetch.ts \
tests/codex-catalog.test.tsLength of output: 49251
The routed-catalog augmentation finding is resolved.
I found no remaining issue for this finding. You are interacting with an AI system. |
|
✅ Action performedReview finished.
|
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
Summary
DeepSeek routed models (deepseek-v4-flash / deepseek-v4-pro) were rebuilt with a 128k context window on every catalog sync, overwriting the user's configured value. Root cause: the registry entry had no
jawcodeBundle, soresolveJawcodeProvider("deepseek")returnedundefinedand the strict-fields fallback wrote 128000. A provider saved under a title-cased key ("DeepSeek") missed the alias table a second time because lookup was case-sensitive.Fix:
src/providers/registry.ts: addjawcodeBundle: "deepseek"to the DeepSeek entry and setmodelContextWindowsto the official 1,048,576. The DeepSeek V4 (flash/pro) parameters — including the 1,048,576 context window, 384k max output, text-only input, andhighdefault reasoning effort — come from DeepSeek's official Codex integration docs: https://api-docs.deepseek.com/quick_start/agent_integrations/codex/scripts/generate-jawcode-metadata.ts+src/generated/jawcode-model-metadata.ts: fold provider-name case inresolveJawcodeProviderso"DeepSeek"resolves like"deepseek"; regenerate the snapshot with the 1,048,576 window.deepseek,DeepSeekresolves, registry context windows updated, and a new catalog test asserts routed deepseek entries restore 1,048,576 instead of the 128k fallback.Verification
bun run typecheckpasses.bun test tests/provider-registry-parity.test.ts tests/jawcode-metadata-sync.test.ts— 35 pass.bun test tests/codex-catalog.test.ts— 120 pass.bun testfor the catalog/adjacent suites (admission/restore/golden/prewarm/vision-sidecar/oauth/cursor) — all green.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit