mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-01 08:42:20 +03:00
fix(provider): stabilize Codex prompt cache routing (#5540)
This commit is contained in:
@@ -431,13 +431,17 @@ async def test_image_retry_discards_provider_state_with_images(
|
||||
|
||||
response = await provider.chat_with_retry(
|
||||
messages=messages,
|
||||
provider_context=ProviderCallContext(conversation_state=state),
|
||||
provider_context=ProviderCallContext(
|
||||
conversation_state=state,
|
||||
session_id="webui:cache-test",
|
||||
),
|
||||
)
|
||||
|
||||
assert response.content == "ok, no image"
|
||||
retry_context = provider.contexts[-1]
|
||||
assert isinstance(retry_context, ProviderCallContext)
|
||||
assert retry_context.conversation_state is None
|
||||
assert retry_context.session_id == "webui:cache-test"
|
||||
public_content = messages[0]["content"]
|
||||
if isinstance(public_content, list):
|
||||
assert all(block.get("type") != "image_url" for block in public_content)
|
||||
|
||||
Reference in New Issue
Block a user