conductor(checkpoint): Phase 3: AI Settings and Tools Simulation complete
This commit is contained in:
42
simulation/sim_ai_settings.py
Normal file
42
simulation/sim_ai_settings.py
Normal file
@@ -0,0 +1,42 @@
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
from simulation.sim_base import BaseSimulation, run_sim
|
||||
|
||||
class AISettingsSimulation(BaseSimulation):
|
||||
def run(self):
|
||||
print("\n--- Running AI Settings Simulation ---")
|
||||
|
||||
# 1. Verify initial model (Gemini by default)
|
||||
provider = self.client.get_value("current_provider")
|
||||
model = self.client.get_value("current_model")
|
||||
print(f"[Sim] Initial Provider: {provider}, Model: {model}")
|
||||
|
||||
# 2. Switch to Anthropic
|
||||
print("[Sim] Switching to Anthropic...")
|
||||
self.client.set_value("current_provider", "anthropic")
|
||||
# Need to set a valid model for Anthropic too
|
||||
anthropic_model = "claude-3-5-sonnet-20241022"
|
||||
self.client.set_value("current_model", anthropic_model)
|
||||
time.sleep(1)
|
||||
|
||||
# Verify
|
||||
new_provider = self.client.get_value("current_provider")
|
||||
new_model = self.client.get_value("current_model")
|
||||
print(f"[Sim] Updated Provider: {new_provider}, Model: {new_model}")
|
||||
assert new_provider == "anthropic", f"Expected 'anthropic', got {new_provider}"
|
||||
assert new_model == anthropic_model, f"Expected {anthropic_model}, got {new_model}"
|
||||
|
||||
# 3. Switch back to Gemini
|
||||
print("[Sim] Switching back to Gemini...")
|
||||
self.client.set_value("current_provider", "gemini")
|
||||
gemini_model = "gemini-2.0-flash"
|
||||
self.client.set_value("current_model", gemini_model)
|
||||
time.sleep(1)
|
||||
|
||||
final_provider = self.client.get_value("current_provider")
|
||||
print(f"[Sim] Final Provider: {final_provider}")
|
||||
assert final_provider == "gemini", f"Expected 'gemini', got {final_provider}"
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_sim(AISettingsSimulation)
|
||||
Reference in New Issue
Block a user