mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 15:22:43 +02:00
fixed bug in Bedrock translation code and dramatically improved tracing for outbound LLM traffic (#601)
* dramatically improve LLM traces and fixed bug with Bedrock translation from claude code * addressing comments --------- Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-288.local>
This commit is contained in:
parent
0ee0912a73
commit
566e7b9c09
8 changed files with 149 additions and 61 deletions
|
|
@ -380,6 +380,16 @@ impl TryFrom<(SseEvent, &SupportedAPIs, &SupportedUpstreamAPIs)> for SseEvent {
|
|||
transformed_event.sse_transform_buffer = format!("\n"); // suppress the event upstream for OpenAI
|
||||
}
|
||||
}
|
||||
(
|
||||
SupportedAPIs::AnthropicMessagesAPI(_),
|
||||
SupportedUpstreamAPIs::AnthropicMessagesAPI(_),
|
||||
) => {
|
||||
// When both client and upstream are Anthropic, suppress event-only lines
|
||||
// because the data line transformation already includes the event line
|
||||
if transformed_event.is_event_only() && transformed_event.event.is_some() {
|
||||
transformed_event.sse_transform_buffer = String::new(); // suppress duplicate event line
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Other combinations can be handled here as needed
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue