You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature] Emit diagnostics when codecs drop request fields, and on the stream path #1215
Several request fields are removed during translation without a TranslationDiagnostic, so
callers cannot tell that the upstream received a weaker request. #607 made the server surface
diagnostics that codecs already emit; this issue is about codecs that emit none for these
drops, and about the stream path, which has no diagnostics channel.
Reproduction on main at f60a7a22, TranslationEngine::default() and TranslationPolicy::default(), translate_request("anthropic_messages", target, …):
top_k, both cache_control markers, document citations
[]
openai_responses
same, plus metadata when present
[]
TranslationEngine::translate_event returns Vec<Value> only, so losses found mid-stream
(for example citations, redacted_thinking or server-tool blocks with no target
representation) cannot be reported either.
Proposal
Emit a warning diagnostic with a JSON path for each known-unrepresentable request field per
codec pair, starting with the four above. lossy_conversion_policy: Reject would then reject
them, as it already does for provider tools.
Add a diagnostics sink to StreamTranslationState (for example a Vec<TranslationDiagnostic> the caller drains), filled by stream codecs when they drop or
degrade content.
Happy to send a PR for (1) if this shape looks right.
Activity