mirror of
https://github.com/katanemo/plano.git
synced 2026-05-10 00:02:43 +02:00
Add first-class ChatGPT subscription provider support (#881)
* Add first-class ChatGPT subscription provider support * Address PR feedback: move uuid import to top, reuse parsed config in up() * Add ChatGPT token watchdog for seamless long-lived sessions * Address PR feedback: error on stream=false for ChatGPT, fix auth file permissions * Replace ChatGPT watchdog/restart with passthrough_auth --------- Co-authored-by: Musa Malik <musam@uw.edu>
This commit is contained in:
parent
aa726b1bba
commit
78dc4edad9
18 changed files with 693 additions and 20 deletions
|
|
@ -255,7 +255,15 @@ async fn llm_chat_inner(
|
|||
if let Some(ref client_api_kind) = client_api {
|
||||
let upstream_api =
|
||||
provider_id.compatible_api_for_client(client_api_kind, is_streaming_request);
|
||||
client_request.normalize_for_upstream(provider_id, &upstream_api);
|
||||
if let Err(e) = client_request.normalize_for_upstream(provider_id, &upstream_api) {
|
||||
warn!(
|
||||
"request_id={}: normalize_for_upstream failed: {}",
|
||||
request_id, e
|
||||
);
|
||||
let mut bad_request = Response::new(full(e.message));
|
||||
*bad_request.status_mut() = StatusCode::BAD_REQUEST;
|
||||
return Ok(bad_request);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Phase 2: Resolve conversation state (v1/responses API) ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue