fix(rust): update gateway message adapter
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled

This commit is contained in:
Yujong Lee 2026-09-06 07:30:57 -07:00 committed by yujonglee
parent e218ab4e26
commit 12c02ddb04
2 changed files with 13 additions and 12 deletions

View file

@ -51,22 +51,22 @@ pub async fn run(
Value::String(upstream_model.to_string()),
);
let options = RequestOptions {
api_key: (deployment.litellm_params.api_key.as_deref()).map(|value| value.to_string()),
api_base: (deployment.litellm_params.api_base.as_deref()).map(|value| value.to_string()),
custom_llm_provider: (custom_llm_provider).map(|value| value.to_string()),
extra_headers,
timeout: None,
..Default::default()
};
let request = MessagesRequest {
model: provider_model,
body,
options: RequestOptions {
api_key: (deployment.litellm_params.api_key.as_deref()).map(|value| value.to_string()),
api_base: (deployment.litellm_params.api_base.as_deref())
.map(|value| value.to_string()),
custom_llm_provider: (custom_llm_provider).map(|value| value.to_string()),
extra_headers,
timeout: None,
..Default::default()
},
};
if request.body.get("stream").and_then(Value::as_bool) == Some(true) {
return messages_stream(
request,
&options,
&LiteLlmRequestContext {
..Default::default()
},
@ -77,6 +77,7 @@ pub async fn run(
let response = messages(
request,
&options,
&LiteLlmRequestContext {
..Default::default()
},

View file

@ -15,7 +15,7 @@
"limit": 0
},
"LIT006": {
"limit": 1027
"limit": 1022
},
"LIT007": {
"limit": 0
@ -27,10 +27,10 @@
"limit": 0
},
"LIT010": {
"limit": 16426
"limit": 16419
},
"LIT011": {
"limit": 5506
"limit": 5497
},
"LIT012": {
"limit": 4486