[PR #7422] fix(session): warn when context window may be too small for tool calling #12394

Open
opened 2026-02-16 18:17:18 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7422

State: open
Merged: No


Summary

  • Add warning log when models with context limits below 16K tokens are used with tools
  • Helps users diagnose tool calling failures with vLLM/Ollama setups
  • Warning includes context limit, recommended minimum, and actionable guidance

Root Cause Analysis

Users with vLLM/Ollama experience tool calling failures because default context windows (2048-8192 tokens) are insufficient for tool
schemas. The minimum recommended is 16,384+ tokens.

Fixes #7185

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7422 **State:** open **Merged:** No --- ## Summary - Add warning log when models with context limits below 16K tokens are used with tools - Helps users diagnose tool calling failures with vLLM/Ollama setups - Warning includes context limit, recommended minimum, and actionable guidance ## Root Cause Analysis Users with vLLM/Ollama experience tool calling failures because default context windows (2048-8192 tokens) are insufficient for tool schemas. The minimum recommended is 16,384+ tokens. Fixes #7185
yindo added the pull-request label 2026-02-16 18:17:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12394