File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def _build_httpx_client(
335335 if (
336336 api_token := api_token or os .environ .get ("REPLICATE_API_TOKEN" )
337337 ) and api_token != "" :
338- headers ["Authorization" ] = f"Token { api_token } "
338+ headers ["Authorization" ] = f"Bearer { api_token } "
339339
340340 base_url = (
341341 base_url or os .environ .get ("REPLICATE_BASE_URL" ) or "https://api.replicate.com"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ async def test_authorization_when_setting_environ_after_import():
1414 router .route (
1515 method = "GET" ,
1616 url = "https://api.replicate.com/" ,
17- headers = {"Authorization" : "Token test-set-after-import" },
17+ headers = {"Authorization" : "Bearer test-set-after-import" },
1818 ).mock (
1919 return_value = httpx .Response (
2020 200 ,
@@ -42,7 +42,7 @@ async def test_client_error_handling():
4242 router .route (
4343 method = "GET" ,
4444 url = "https://api.replicate.com/" ,
45- headers = {"Authorization" : "Token test-client-error" },
45+ headers = {"Authorization" : "Bearer test-client-error" },
4646 ).mock (
4747 return_value = httpx .Response (
4848 400 ,
@@ -69,7 +69,7 @@ async def test_server_error_handling():
6969 router .route (
7070 method = "GET" ,
7171 url = "https://api.replicate.com/" ,
72- headers = {"Authorization" : "Token test-server-error" },
72+ headers = {"Authorization" : "Bearer test-server-error" },
7373 ).mock (
7474 return_value = httpx .Response (
7575 500 ,
You can’t perform that action at this time.
0 commit comments