mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
OpenRouter checks input + max_tokens against the context window before routing, using its own tokenizer. For prose it counted up to 12% more input tokens than the provider. pi left only 4096 tokens spare, so models whose output limit is close to the window (e.g. DeepSeek flash) were rejected with a 400, which pi then treated as a context overflow and compacted. The default output limit now leaves 15% of the estimated input unused (at least 4096). When that would leave less than 32768 tokens of output, only the fixed 4096 margin is kept and output is capped at 32768. fixes #10497 |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| chord | ||
| codemode | ||
| coding-agent | ||
| durable | ||
| env | ||
| evals | ||
| mcp | ||
| schema | ||
| telemetry | ||
| tui | ||