rr1 commited on
Commit
7d3733b
·
verified ·
1 Parent(s): a3f9a06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -11,8 +11,8 @@ TARGET_API = "https://openrouter.ai"
11
 
12
  # Path mappings
13
  PATH_MAPPINGS = {
14
- "/hf/v1/chat": "/api/v1/chat",
15
- "/hf/v1/models": "/api/v1/models"
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,