Working Memory v2 update branch forces a specific tool_choice, rejected by reasoning models that disallow forced tool_choice (DeepSeek thinking mode → HTTP 400)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start in openviking/session/session.py at the Working Memory v2 incremental-update branch and inspect how the session commit phase calls the VLM. Reproduce with POST /api/v1/sessions//commit on a session with a prior archive, then verify that a reasoning model rejecting forced tool_choice can complete the commit and extract long-term memories.
Written by the indexing model from the issue text.
Description
Environment
- OpenViking v0.4.22 (official docker image)
- VLM backend: DeepSeek official API (
https://api.deepseek.com, modeldeepseek-flash),
thinking enabled viavlm.extra_request_body = {"thinking": {"type": "enabled"}} - Triggered by: commit of a session that already has a prior Working Memory v2 archive
(i.e. the second and any subsequent commit of the same session)
Steps to reproduce
- Configure a reasoning-style model that rejects forced
tool_choicein thinking mode
(DeepSeekdeepseek-flashwiththinkingenabled behaves this way). POST /api/v1/sessions/<sid>/commiton a session that already has a completed archive
(prior WM v2 exists).- Phase 2 Working Memory enters the incremental-update branch and issues:
# openviking/session/session.py (main), Branch 2: has prior WM v2
resp = await vlm.get_completion_async(
prompt=update_prompt,
tools=[WM_UPDATE_TOOL],
tool_choice={
"type": "function",
"function": {"name": "update_working_memory"},
},
)
- The provider answers:
400 - {'error': {'message': 'Thinking mode does not support this tool_choice',
'type': 'invalid_request_error'}}
- Phase 2 raises → the whole
session_committask is markedfailed
(Phase 2 step archive_summary failed), so no long-term memories are extracted
from that commit either.
Expected behavior
First-time commits (Branch 1: plain completion, no forced tool_choice) work fine with the
same provider/model. The incremental-update branch should also work with reasoning models —
e.g. fall back to tool_choice="auto" (the prompt already instructs the model to call
update_working_memory), make the tool_choice configurable, or retry with auto when the
provider returns "thinking mode does not support this tool_choice".
Observed impact
- Any re-commit of a live session fails under such providers, so incremental memory
extraction silently stops working for those sessions. - First commits are unaffected, which makes the issue easy to miss.
Suggested fix
Use tool_choice="auto" in the WM v2 UPDATE branch, or add an automatic fallback:
on 400 thinking mode does not support this tool_choice retry once with
tool_choice="auto".
- Dominant language
- Python
- Stars
- 40.8k
- Forks
- 3.3k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 388
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcengine/OpenViking
-
[Feature]: hermes-plugin — forward events_time_decay_protection on auto-recall (parity with #6390)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
volcengine/OpenViking#6533 ·
Maintainers usually reply within 1 day
-
[Bug]: write normalizes whitespace-bearing segments silently while extraction keeps interior spaces — silent forkPossibly taken @r266-tech claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
volcengine/OpenViking#6521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
volcengine/OpenViking#6489 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
volcengine/OpenViking#6471 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Python SDK duplicates URI scheme after leading whitespacePossibly taken @ktz03 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
volcengine/OpenViking#6445 ·
Maintainers usually reply within 1 day
All issues in volcengine/OpenViking
Similar issues
-
tests/strategies_test.py:174 goes uncovered on about 1 run in 100, failing the coverage ratchetOpenflaky-watch
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
btclib-org/btclib#2839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nion-software/nionswift#2018 ·
Maintainers usually reply within 1 day
-
Deleting a member fails when another member's share transfer points to themPossibly taken @Beerlesklopfer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FoodCoopX/wirgarten-tapir#1336 ·
Maintainers usually reply within 3 days
-
pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
pydantic/pydantic-ai#11467 ·
Maintainers usually reply within 1 day
-
Link Checker ReportOpenautomated issue linkchecker report
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
QuantEcon/lecture-python.myst#1098 ·
Maintainers usually reply within 1 day