claude-proxy / test_final.py
dheraingoud's picture
Deploy latest upstream with key rotation, vision adapter, and HF configs
61bb677
Raw
History Blame Contribute Delete
748 Bytes
def run():
from fastapi.testclient import TestClient
from free_claude_code.runtime.bootstrap import build_asgi_app
from free_claude_code.config.settings import Settings
from free_claude_code.api.dependencies import require_proxy_auth
app = build_asgi_app(Settings(nvidia_nim_api_key="FAKE"))
app.dependency_overrides[require_proxy_auth] = lambda: None
client = TestClient(app)
response = client.post(
"/v1/messages",
json={
"model": "nvidia/nemotron",
"messages": [{"role": "user", "content": "hi"}],
"max_tokens": 10
}
)
print("STATUS:", response.status_code)
if response.status_code != 200:
print("RESPONSE:", response.text)
run()