27 lines
919 B
Python
27 lines
919 B
Python
def simulate_get_tiered_model(tier, mock_store):
|
|
mapping = {
|
|
"powerful": "LLM_MODEL_POWERFUL",
|
|
"fast": "LLM_MODEL_FAST",
|
|
"free": "LLM_MODEL_FREE"
|
|
}
|
|
prop_key = mapping.get(tier.lower(), "LLM_MODEL_TEXT")
|
|
return mock_store.get(prop_key, "gpt-3.5-turbo") # Default
|
|
|
|
if __name__ == "__main__":
|
|
mock_store = {
|
|
"LLM_MODEL_POWERFUL": "claude-3-opus",
|
|
"LLM_MODEL_FAST": "gpt-4o-mini"
|
|
}
|
|
|
|
print("--- Test: Tier Resolution ---")
|
|
m1 = simulate_get_tiered_model("powerful", mock_store)
|
|
m2 = simulate_get_tiered_model("fast", mock_store)
|
|
m3 = simulate_get_tiered_model("free", mock_store) # Not in store
|
|
|
|
print(f"Powerful: {m1}")
|
|
print(f"Fast: {m2}")
|
|
print(f"Free (Default): {m3}")
|
|
|
|
status = "PASS" if m1 == "claude-3-opus" and m2 == "gpt-4o-mini" and m3 == "gpt-3.5-turbo" else "FAIL"
|
|
print(f"\nFinal Status: {status}")
|