mirror of
https://github.com/katanemo/plano.git
synced 2026-04-25 00:36:34 +02:00
adding support for claude code routing (#575)
* fixed for claude code routing. first commit * removing redundant enum tags for cache_control * making sure that claude code can run via the archgw cli * fixing broken config * adding a README.md and updated the cli to use more of our defined patterns for params * fixed config.yaml * minor fixes to make sure PR is clean. Ready to ship * adding claude-sonnet-4-5 to the config * fixes based on PR * fixed alias for README * fixed 400 error handling tests, now that we write temperature to 1.0 for GPT-5 --------- Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-257.local> Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-288.local>
This commit is contained in:
parent
03c2cf6f0d
commit
f00870dccb
16 changed files with 903 additions and 106 deletions
|
|
@ -395,23 +395,15 @@ impl StreamContext {
|
|||
}
|
||||
}
|
||||
|
||||
fn debug_log_body(&self, body: &[u8]) {
|
||||
debug!(
|
||||
"[ARCHGW_REQ_ID:{}] UPSTREAM_RAW_RESPONSE: body_size={} content={}",
|
||||
self.request_identifier(),
|
||||
body.len(),
|
||||
String::from_utf8_lossy(body)
|
||||
);
|
||||
}
|
||||
|
||||
fn handle_streaming_response(
|
||||
&mut self,
|
||||
body: &[u8],
|
||||
provider_id: ProviderId,
|
||||
) -> Result<Vec<u8>, Action> {
|
||||
debug!(
|
||||
"[ARCHGW_REQ_ID:{}] STREAMING_PROCESS: provider_id={:?} chunk_size={}",
|
||||
"[ARCHGW_REQ_ID:{}] STREAMING_PROCESS: client={:?} provider_id={:?} chunk_size={}",
|
||||
self.request_identifier(),
|
||||
self.client_api,
|
||||
provider_id,
|
||||
body.len()
|
||||
);
|
||||
|
|
@ -958,7 +950,12 @@ impl HttpContext for StreamContext {
|
|||
Err(action) => return action,
|
||||
};
|
||||
|
||||
self.debug_log_body(&body);
|
||||
debug!(
|
||||
"[ARCHGW_REQ_ID:{}] UPSTREAM_RAW_RESPONSE: body_size={} content={}",
|
||||
self.request_identifier(),
|
||||
body.len(),
|
||||
String::from_utf8_lossy(&body)
|
||||
);
|
||||
|
||||
let provider_id = self.get_provider_id();
|
||||
if self.streaming_response {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue