mirror of
https://github.com/katanemo/plano.git
synced 2026-05-07 23:02:43 +02:00
draft commit to add support for xAI, TogehterAI, AzureOpenAI (#570)
* draft commit to add support for xAI, LambdaAI, TogehterAI, AzureOpenAI * fixing failing tests and updating rederend config file * Update arch_config_with_aliases.yaml * adding the AZURE_API_KEY to the GH workflow for e2e * fixing GH secerts * adding valdiating for azure_openai --------- Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-167.local>
This commit is contained in:
parent
b56311f458
commit
8d0b468345
12 changed files with 166 additions and 24 deletions
|
|
@ -98,8 +98,14 @@ impl StreamContext {
|
|||
fn update_upstream_path(&mut self, request_path: &str) {
|
||||
let hermes_provider_id = self.llm_provider().to_provider_id();
|
||||
if let Some(api) = &self.client_api {
|
||||
let target_endpoint =
|
||||
api.target_endpoint_for_provider(&hermes_provider_id, request_path);
|
||||
let target_endpoint = api.target_endpoint_for_provider(
|
||||
&hermes_provider_id,
|
||||
request_path,
|
||||
self.llm_provider()
|
||||
.model
|
||||
.as_ref()
|
||||
.unwrap_or(&"".to_string()),
|
||||
);
|
||||
if target_endpoint != request_path {
|
||||
self.set_http_request_header(":path", Some(&target_endpoint));
|
||||
}
|
||||
|
|
@ -622,7 +628,12 @@ impl HttpContext for StreamContext {
|
|||
if self.llm_provider().endpoint.is_some() {
|
||||
self.add_http_request_header(
|
||||
ARCH_ROUTING_HEADER,
|
||||
&self.llm_provider().name.to_string(),
|
||||
&self
|
||||
.llm_provider()
|
||||
.cluster_name
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.to_string(),
|
||||
);
|
||||
} else {
|
||||
self.add_http_request_header(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue