mirror of
https://github.com/katanemo/plano.git
synced 2026-05-11 16:52:41 +02:00
Address PR feedback: error on stream=false for ChatGPT, fix auth file permissions
This commit is contained in:
parent
c0cc226b74
commit
5af3199f5a
4 changed files with 45 additions and 12 deletions
|
|
@ -1056,7 +1056,20 @@ impl HttpContext for StreamContext {
|
|||
|
||||
match ProviderRequestType::try_from((deserialized_client_request, upstream)) {
|
||||
Ok(mut request) => {
|
||||
request.normalize_for_upstream(self.get_provider_id(), upstream);
|
||||
if let Err(e) =
|
||||
request.normalize_for_upstream(self.get_provider_id(), upstream)
|
||||
{
|
||||
warn!(
|
||||
"request_id={}: normalize_for_upstream failed: {}",
|
||||
self.request_identifier(),
|
||||
e
|
||||
);
|
||||
self.send_server_error(
|
||||
ServerError::LogicError(e.message),
|
||||
Some(StatusCode::BAD_REQUEST),
|
||||
);
|
||||
return Action::Pause;
|
||||
}
|
||||
debug!(
|
||||
"request_id={}: upstream request payload: {}",
|
||||
self.request_identifier(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue