pub mod cache_control;
pub mod request;
pub mod response;
pub mod stream;
pub mod thinking;
pub mod tools;
pub use cache_control::{
CacheControlStrategy, DefaultCacheControlStrategy, MAX_CACHE_BREAKPOINTS,
NoCacheControlStrategy, ephemeral_marker, ephemeral_marker_with_ttl,
};
pub use request::AnthropicRequestTranslator;
pub use response::AnthropicResponseTranslator;
pub use stream::AnthropicStreamParser;
pub use thinking::{AnthropicThinkingProjector, AnthropicThinkingTarget};
use crate::types::StopReason;
use aigw_core::model::FinishReason;
impl From<StopReason> for FinishReason {
fn from(reason: StopReason) -> Self {
match reason {
StopReason::EndTurn | StopReason::StopSequence => FinishReason::Stop,
StopReason::MaxTokens => FinishReason::Length,
StopReason::ToolUse => FinishReason::ToolCalls,
StopReason::Other(s) => FinishReason::Unknown(s),
}
}
}