Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/llm/api_models.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@
"model_name": "gemini-2.5-pro-preview-06-05",
"provider": "Google"
},
{
"display_name": "Gemini 2.5 Pro (OpenRouter)",
"model_name": "google/gemini-2.5-pro",
"provider": "OpenRouter"
},
{
"display_name": "Gemini 2.5 Flash (OpenRouter)",
"model_name": "google/gemini-2.5-flash",
"provider": "OpenRouter"
},
{
"display_name": "GLM-4.5 Air",
"model_name": "z-ai/glm-4.5-air",
Expand All @@ -83,5 +93,10 @@
"display_name": "Azure Open AI Deployment",
"model_name": "",
"provider": "Azure OpenAI"
},
{
"display_name": "Custom OpenRouter Model",
"model_name": "-",
"provider": "OpenRouter"
}
]
8 changes: 6 additions & 2 deletions src/tools/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import pandas as pd
import requests
import time
import urllib3

# Disable SSL warnings
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

from src.data.cache import get_cache
from src.data.models import (
Expand Down Expand Up @@ -42,9 +46,9 @@ def _make_api_request(url: str, headers: dict, method: str = "GET", json_data: d
"""
for attempt in range(max_retries + 1): # +1 for initial attempt
if method.upper() == "POST":
response = requests.post(url, headers=headers, json=json_data)
response = requests.post(url, headers=headers, json=json_data, verify=False)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come the verify=False here is needed?

else:
response = requests.get(url, headers=headers)
response = requests.get(url, headers=headers, verify=False)

if response.status_code == 429 and attempt < max_retries:
# Linear backoff: 60s, 90s, 120s, 150s...
Expand Down