Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Working Memory v2 update branch forces a specific tool_choice, rejected by reasoning models that disallow forced tool_choice (DeepSeek thinking mode → HTTP 400)

Closed Beginner friendly
#5,565 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@varun-projects is already working on this.

Since Oct 5, 2026.

  • #5636 by @varun-projects — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ai, backend

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

kernel
Environment
  • OpenViking v0.4.22 (official docker image)
  • VLM backend: DeepSeek official API (https://api.deepseek.com, model deepseek-flash),
    thinking enabled via vlm.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
  1. Configure a reasoning-style model that rejects forced tool_choice in thinking mode
    (DeepSeek deepseek-flash with thinking enabled behaves this way).
  2. POST /api/v1/sessions/<sid>/commit on a session that already has a completed archive
    (prior WM v2 exists).
  3. 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"},
    },
)
  1. The provider answers:
400 - {'error': {'message': 'Thinking mode does not support this tool_choice',
      'type': 'invalid_request_error'}}
  1. Phase 2 raises → the whole session_commit task is marked failed
    (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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from volcengine/OpenViking

All issues in volcengine/OpenViking

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.