Revert "add app headers for openrouter"
This reverts commit 9dee031a2a.
This commit is contained in:
parent
129e7a11ab
commit
a022bb3586
|
|
@ -119,11 +119,6 @@ def create_openrouter_client(
|
||||||
is_expert: bool = False,
|
is_expert: bool = False,
|
||||||
) -> BaseChatModel:
|
) -> BaseChatModel:
|
||||||
"""Create OpenRouter client with appropriate configuration."""
|
"""Create OpenRouter client with appropriate configuration."""
|
||||||
default_headers = {
|
|
||||||
"HTTP-Referer": "https://ra-aid.ai",
|
|
||||||
"X-Title": "RA.Aid"
|
|
||||||
}
|
|
||||||
|
|
||||||
if model_name.startswith("deepseek/") and "deepseek-r1" in model_name.lower():
|
if model_name.startswith("deepseek/") and "deepseek-r1" in model_name.lower():
|
||||||
return ChatDeepseekReasoner(
|
return ChatDeepseekReasoner(
|
||||||
api_key=api_key,
|
api_key=api_key,
|
||||||
|
|
@ -134,7 +129,6 @@ def create_openrouter_client(
|
||||||
model=model_name,
|
model=model_name,
|
||||||
timeout=LLM_REQUEST_TIMEOUT,
|
timeout=LLM_REQUEST_TIMEOUT,
|
||||||
max_retries=LLM_MAX_RETRIES,
|
max_retries=LLM_MAX_RETRIES,
|
||||||
default_headers=default_headers,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return ChatOpenAI(
|
return ChatOpenAI(
|
||||||
|
|
@ -143,7 +137,6 @@ def create_openrouter_client(
|
||||||
model=model_name,
|
model=model_name,
|
||||||
timeout=LLM_REQUEST_TIMEOUT,
|
timeout=LLM_REQUEST_TIMEOUT,
|
||||||
max_retries=LLM_MAX_RETRIES,
|
max_retries=LLM_MAX_RETRIES,
|
||||||
default_headers=default_headers,
|
|
||||||
**({"temperature": temperature} if temperature is not None else {}),
|
**({"temperature": temperature} if temperature is not None else {}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue