adding support for model aliases in archgw (#566)

* adding support for model aliases in archgw

* fixed PR based on feedback

* removing README. Not relevant for PR

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-136.local>
This commit is contained in:
Salman Paracha 2025-09-16 11:12:08 -07:00 committed by GitHub
parent 1e8c81d8f6
commit 4eb2b410c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 634 additions and 14 deletions

View file

@ -97,7 +97,7 @@ impl TryFrom<AnthropicMessagesRequest> for ChatCompletionsRequest {
let openai_tools = req.tools.map(|tools| convert_anthropic_tools(tools));
let (openai_tool_choice, parallel_tool_calls) = convert_anthropic_tool_choice(req.tool_choice);
Ok(ChatCompletionsRequest {
let mut _chat_completions_req: ChatCompletionsRequest = ChatCompletionsRequest {
model: req.model,
messages: openai_messages,
temperature: req.temperature,
@ -109,7 +109,9 @@ impl TryFrom<AnthropicMessagesRequest> for ChatCompletionsRequest {
tool_choice: openai_tool_choice,
parallel_tool_calls,
..Default::default()
})
};
_chat_completions_req.suppress_max_tokens_if_o3();
Ok(_chat_completions_req)
}
}