Repository navigation
Closed
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: mediumP2 - normal prioritytriage: unclearCannot reproduce / insufficient info
Description
Also hitting the over available context size issue...
Let me rewrite the conftest to use a proper async wrapper around synchronous SQLite, avoiding aiosqlite’s global connection cache entirely. ✓ write src/backend/tests/conftest.py (+70 -69) · 1.7k tok ┌─ diff │ +"""Test configuration with fresh SQLite database per test.""" │ +import asyncio │ -from sqlalchemy import text │ -from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker │ -from sqlalchemy.pool import StaticPool │ +from contextlib import asynccontextmanager │ ... 127 more changes ... │ + # Clean up the temp file │ + if os.path.exists(db_path): │ + try: │ + os.remove(db_path) │ + except OSError: │ + pass └─ (+70 -69 total) OpenAI-compatible chat request failed endpoint: http://10.10.4.127:8080/v1/chat/completions model: ornith-box-1:/opt/models/ornith-1.0-35b-Q4_K_M.gguf auth: local endpoint (no auth) status: 400 Bad Request response: {"error":{"code":400,"message":"request (131263 tokens) exceeds the available context size (131072 tokens), try increasing it","type":"exceed_context_size_error","n_prompt_tokens":131263,"n_ctx":131072}} Hint: check network connectivity, DNS/TLS, that the base URL includes the API version (usually /v1), and that the model exists on the provider.It hit that around 90K context.
Metadata
Metadata
Assignees
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: mediumP2 - normal prioritytriage: unclearCannot reproduce / insufficient info
Activity
fix: resolve configured context_window for qualified runtime model sh…
1jehuang commentedon Jul 3, 2026
Fixed on master in 0ed4140.
Root cause: your configured
context_window = 131072was seeded into the global context-limit cache only under the bare lowercased model id, but the runtime request model was provider-qualified (cachyai-a2000:qwen3.6-35b-a2000-128k, and in the #403 follow-up a llama.cpp slash pathornith-box-1:/opt/models/ornith-1.0-35b-Q4_K_M.gguf). The qualified lookup missed the cache and budgeting fell back to the 200K default, which over-sent context against your 131K window (~90K visible + overhead ≈ 131,263 tokens at failure).Configured per-model
context_windowvalues are now seeded under every lookup shape: bare id, slash base, and<profile>:<id>. Regression tests cover all four spec shapes from your reports.1jehuang commentedon Jul 3, 2026
Closing: fixed on master in 0ed4140 (see comment above).
fix: resolve configured context_window for qualified runtime model sh…
fix: resolve configured context_window for qualified runtime model sh…