fix(tokens): warm fallback tokenizer in background (#5861)

* fix(tokens): keep fallback token estimation offline

* fix(tokens): warm fallback tokenizer in background

* test(tokens): isolate agent fixtures from tokenizer readiness

* test(tokens): keep Codex pressure fixtures within byte budget

* docs: remove manual wrapping from troubleshooting prose
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-28 13:50:55 +08:00
1 parent e0b8efa0be
commit 4a7ad00e4f
16 files changed
+378 -101

No files matched your search

+3
View File
@@ -86,6 +86,9 @@ async def test_process_message_hands_complete_replay_to_runner(tmp_path: Path) -
@pytest.mark.asyncio
async def test_runner_checkpoint_keeps_current_user_as_replay_boundary(tmp_path: Path) -> None:
loop = _make_loop(tmp_path, context_window_tokens=8_000)
loop.provider.estimate_prompt_tokens.side_effect = (
lambda messages, tools, model: (100 * len(messages), "test")
)
loop.provider.chat_stream_with_retry = AsyncMock(
return_value=LLMResponse(content="ok", tool_calls=[], usage=None)
)