-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_imports.py
More file actions
33 lines (23 loc) · 904 Bytes
/
test_imports.py
File metadata and controls
33 lines (23 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python3
# Test script to verify imports work
import sys
sys.path.insert(0, "src")
try:
from clippy.llm.openai import OpenAIProvider, _is_reasoner_model
print("✓ Imports successful")
# Test basic functionality
provider = OpenAIProvider()
print(f"✓ Provider created with base_url: {provider.base_url}")
# Test reasoner function
assert _is_reasoner_model("deepseek-r1") is True
assert _is_reasoner_model("gpt-4") is False
print("✓ Reasoner model detection works")
# Test responses API detection
assert provider._should_use_responses_api("code-davinci-002") is True
assert provider._should_use_responses_api("gpt-4") is False
print("✓ Responses API detection works")
print("\n✓ All basic functionality tests passed!")
except Exception as e:
print(f"✗ Error: {e}")
import traceback
traceback.print_exc()