Skip to main content

gproxy_protocol/transform/generate/claude_chat/
mod.rs

1//! Direct Claude Messages ↔ OpenAI Chat conversions.
2//!
3//! The pair operates on the declared wire DTOs. It never consults flattened
4//! `rest` fields and never routes through Responses, Gemini, or a common content
5//! representation.
6//!
7//! Existing tool-call IDs are preserved so call/result links remain stable.
8//! Target-specific validation or rewriting must run in the host's IdentityFlow
9//! before this pure pair; this module does not invent prefixes or signatures.
10//! This module converts buffered messages only, not streaming event lifecycles.
11
12mod content;
13mod media;
14mod request;
15mod requirements;
16mod response;
17mod schema;
18pub mod stream;
19mod tools;
20mod usage;
21mod util;
22
23pub use request::{claude_to_openai, openai_to_claude};
24pub use response::{claude_response_to_openai, openai_response_to_claude};
25
26#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
27pub struct ResponseSupplement {
28    pub created_unix_seconds: Option<i64>,
29}