Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ TARGET_API = "https://openrouter.ai"
|
|
11 |
|
12 |
# Path mappings
|
13 |
PATH_MAPPINGS = {
|
14 |
-
"/
|
15 |
-
"/
|
16 |
}
|
17 |
|
18 |
# Get API keys from environment variable
|
@@ -84,6 +84,7 @@ def proxy(path):
|
|
84 |
|
85 |
# Handle GET requests without streaming
|
86 |
elif request.method == 'GET':
|
|
|
87 |
response = requests.get(
|
88 |
target_url,
|
89 |
headers=headers,
|
|
|
11 |
|
12 |
# Path mappings
|
13 |
PATH_MAPPINGS = {
|
14 |
+
"/api/v1/chat": "/api/v1/chat",
|
15 |
+
"/api/v1/models": "/api/v1/models"
|
16 |
}
|
17 |
|
18 |
# Get API keys from environment variable
|
|
|
84 |
|
85 |
# Handle GET requests without streaming
|
86 |
elif request.method == 'GET':
|
87 |
+
headers = {key: value for key, value in request.headers if key != 'Authorization'}
|
88 |
response = requests.get(
|
89 |
target_url,
|
90 |
headers=headers,
|