Quick test mode for simulation tests
Fixed o4-mini name, OpenAI removed o4-mini-high Add max_output_tokens property to ModelCapabilities Fixed tests after refactor
This commit is contained in:
@@ -506,17 +506,17 @@ class TestConversationFlow:
|
||||
mock_client = Mock()
|
||||
mock_storage.return_value = mock_client
|
||||
|
||||
# Start conversation with files
|
||||
thread_id = create_thread("analyze", {"prompt": "Analyze this codebase", "relevant_files": ["/project/src/"]})
|
||||
# Start conversation with files using a simple tool
|
||||
thread_id = create_thread("chat", {"prompt": "Analyze this codebase", "files": ["/project/src/"]})
|
||||
|
||||
# Turn 1: Claude provides context with multiple files
|
||||
initial_context = ThreadContext(
|
||||
thread_id=thread_id,
|
||||
created_at="2023-01-01T00:00:00Z",
|
||||
last_updated_at="2023-01-01T00:00:00Z",
|
||||
tool_name="analyze",
|
||||
tool_name="chat",
|
||||
turns=[],
|
||||
initial_context={"prompt": "Analyze this codebase", "relevant_files": ["/project/src/"]},
|
||||
initial_context={"prompt": "Analyze this codebase", "files": ["/project/src/"]},
|
||||
)
|
||||
mock_client.get.return_value = initial_context.model_dump_json()
|
||||
|
||||
|
||||
@@ -483,14 +483,14 @@ class TestImageSupportIntegration:
|
||||
tool_name="chat",
|
||||
)
|
||||
|
||||
# Create child thread linked to parent
|
||||
child_thread_id = create_thread("debug", {"child": "context"}, parent_thread_id=parent_thread_id)
|
||||
# Create child thread linked to parent using a simple tool
|
||||
child_thread_id = create_thread("chat", {"prompt": "child context"}, parent_thread_id=parent_thread_id)
|
||||
add_turn(
|
||||
thread_id=child_thread_id,
|
||||
role="user",
|
||||
content="Child thread with more images",
|
||||
images=["child1.png", "shared.png"], # shared.png appears again (should prioritize newer)
|
||||
tool_name="debug",
|
||||
tool_name="chat",
|
||||
)
|
||||
|
||||
# Mock child thread context for get_thread call
|
||||
|
||||
@@ -89,7 +89,7 @@ class TestModelMetadataContinuation:
|
||||
@pytest.mark.asyncio
|
||||
async def test_multiple_turns_uses_last_assistant_model(self):
|
||||
"""Test that with multiple turns, the last assistant turn's model is used."""
|
||||
thread_id = create_thread("analyze", {"prompt": "analyze this"})
|
||||
thread_id = create_thread("chat", {"prompt": "analyze this"})
|
||||
|
||||
# Add multiple turns with different models
|
||||
add_turn(thread_id, "assistant", "First response", model_name="gemini-2.5-flash", model_provider="google")
|
||||
@@ -185,11 +185,11 @@ class TestModelMetadataContinuation:
|
||||
async def test_thread_chain_model_preservation(self):
|
||||
"""Test model preservation across thread chains (parent-child relationships)."""
|
||||
# Create parent thread
|
||||
parent_id = create_thread("analyze", {"prompt": "analyze"})
|
||||
parent_id = create_thread("chat", {"prompt": "analyze"})
|
||||
add_turn(parent_id, "assistant", "Analysis", model_name="gemini-2.5-pro", model_provider="google")
|
||||
|
||||
# Create child thread
|
||||
child_id = create_thread("codereview", {"prompt": "review"}, parent_thread_id=parent_id)
|
||||
# Create child thread using a simple tool instead of workflow tool
|
||||
child_id = create_thread("chat", {"prompt": "review"}, parent_thread_id=parent_id)
|
||||
|
||||
# Child thread should be able to access parent's model through chain traversal
|
||||
# NOTE: Current implementation only checks current thread (not parent threads)
|
||||
|
||||
Reference in New Issue
Block a user