Skip to content

fix: sync DeepSeek V4 Chat controls from Python any-llm - #30

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/any-llm-library-sync-aaa5
Closed

cursor[bot] wants to merge 2 commits into
mainfrom
cursor/any-llm-library-sync-aaa5

Conversation

@cursor

@cursor cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Sync with mozilla-ai/any-llm main through d137811 (2 new commits since c2420fa). One PR for the applicable library change.

Ported

  • #1380: preserve DeepSeek V4 Chat controls without mutating callers. None/auto leave thinking and effort unset so the provider default (enabled/high) applies. Explicit none sends thinking: { type: "disabled" }. low/medium/high/xhigh/max map to DeepSeek's low/high/max wire efforts with thinking enabled. minimal raises InvalidRequestError. user becomes validated user_id ([A-Za-z0-9_-]{1,512}). Unsupported fields (frequency_penalty, logit_bias, n, parallel_tool_calls, presence_penalty, seed, service_tier) are dropped. Caller providerOptions.thinking / user_id win and are not mutated. When tools is present, previous assistant reasoning_content is replayed on every assistant turn (not only tool-call turns) and extra_content stays off the wire.

Skipped (not applicable)

  • #1385: use Qwen 3.5 9B for Together AI integration tests. Python tests/conftest.py fixtures only; this repo has no matching live model map.

Draft sync PRs #29 (created 2026-09-08) and #28 (created 2026-09-04) are still open but older than one day, so this is a new PR rather than a push onto those branches.

Tracked source SHA is now d1378116f9fc9528892044712e0ab2bb17d0aa6e. oxfmt and oxlint were run after the changes.

Open in Web View Automation 

Port mozilla-ai/any-llm #1380 so DeepSeek maps reasoning effort to the
current V4 Chat thinking and effort fields, validates user_id, drops
unsupported request fields, and replays assistant reasoning whenever
tools are present.

Co-authored-by: Anurag Roy <anuragroy@duck.com>
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
any-llm-ts Ready Ready Preview Sep 11, 2026 3:51am UTC

Port mozilla-ai/any-llm #1372 and #1381 so Gemini maps reasoning effort
to current thinking levels and model budgets, Otari keeps structured
Messages on the native endpoint, and Anthropic/Otari can stream
schema-constrained Messages events.

Co-authored-by: Anurag Roy <anuragroy@duck.com>
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #32, which rebases this change onto current main (after #28) and combines it with #29 and #31.

@anurag-roy anurag-roy closed this Sep 13, 2026
@anurag-roy
anurag-roy deleted the cursor/any-llm-library-sync-aaa5 branch September 20, 2026 11:33

This branch was successfully deployed

1 active deployment
Preview — def4fadc Deployed Sep 11, 2026 by vercel[bot]
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.

2 participants