fix: external model name now recorded properly in responses
test: http cassettes added for improved integration tests refactor: generic name for the CLI agent
This commit is contained in:
@@ -197,7 +197,7 @@ class TestConversationHistoryBuilding:
|
||||
# Verify structure
|
||||
assert "=== CONVERSATION HISTORY (CONTINUATION) ===" in history
|
||||
assert "=== FILES REFERENCED IN THIS CONVERSATION ===" in history
|
||||
assert "--- Turn 1 (Claude) ---" in history
|
||||
assert "--- Turn 1 (Agent) ---" in history
|
||||
|
||||
# Verify file content is embedded
|
||||
assert "--- BEGIN FILE:" in history
|
||||
@@ -300,6 +300,8 @@ class TestCrossToolFileContext:
|
||||
timestamp="2023-01-01T00:00:00Z", # First turn
|
||||
files=[src_file],
|
||||
tool_name="analyze",
|
||||
model_name="gemini-2.5-flash",
|
||||
model_provider="google",
|
||||
),
|
||||
ConversationTurn(
|
||||
role="user",
|
||||
@@ -313,6 +315,8 @@ class TestCrossToolFileContext:
|
||||
timestamp="2023-01-01T00:02:00Z", # Third turn (2 minutes later)
|
||||
files=[src_file, test_file], # References both files
|
||||
tool_name="testgen",
|
||||
model_name="gpt-5",
|
||||
model_provider="openai",
|
||||
),
|
||||
]
|
||||
|
||||
@@ -328,9 +332,9 @@ class TestCrossToolFileContext:
|
||||
history, tokens = build_conversation_history(context)
|
||||
|
||||
# Verify cross-tool context
|
||||
assert "--- Turn 1 (Gemini using analyze) ---" in history
|
||||
assert "--- Turn 2 (Claude) ---" in history
|
||||
assert "--- Turn 3 (Gemini using testgen) ---" in history
|
||||
assert "--- Turn 1 (gemini-2.5-flash using analyze via google) ---" in history
|
||||
assert "--- Turn 2 (Agent) ---" in history
|
||||
assert "--- Turn 3 (gpt-5 using testgen via openai) ---" in history
|
||||
|
||||
# Verify file context preservation
|
||||
assert "Files used in this turn: " + src_file in history
|
||||
@@ -464,7 +468,7 @@ class TestSmallAndNewConversations:
|
||||
# Should work correctly for single turn
|
||||
assert "=== CONVERSATION HISTORY (CONTINUATION) ===" in history
|
||||
assert "=== FILES REFERENCED IN THIS CONVERSATION ===" in history
|
||||
assert "--- Turn 1 (Claude) ---" in history
|
||||
assert "--- Turn 1 (Agent) ---" in history
|
||||
assert "Quick question about this file" in history
|
||||
assert test_file in history
|
||||
assert tokens > 0
|
||||
@@ -536,6 +540,6 @@ class TestFailureScenarios:
|
||||
|
||||
# Should handle gracefully - build history with accessible files
|
||||
assert "=== CONVERSATION HISTORY (CONTINUATION) ===" in history
|
||||
assert "--- Turn 1 (Claude) ---" in history
|
||||
assert "--- Turn 1 (Agent) ---" in history
|
||||
assert "Analyze these files" in history
|
||||
assert tokens > 0
|
||||
|
||||
Reference in New Issue
Block a user