`transport.rs` の HTTP 送信〜ステータスチェック区間に指数バックオフ + フルジッターのリトライループを追加する。SSE 読み出し開始後 ( `bytes_stream()` 以降) のエラーは従来どおりそのまま流す。 - `is_retryable(&ClientError)`: 408/425/429/500/502/503/504/529 と reqwest の connect/timeout のみ true - `RetryPolicy` (default: base 500ms / cap 10s / max_attempts 4 / total_timeout 30s) - `Retry-After` ヘッダ (秒数) があればバックオフを上書き - リトライ発火ごとに warn! でステータス・attempt・wait を出す ref: tickets/llm-worker-transient-retry.md
36 lines
784 B
Rust
36 lines
784 B
Rust
//! LLMクライアント層
|
||
//!
|
||
//! 各LLMプロバイダと通信し、統一された[`Event`]
|
||
//! ストリームを出力します。
|
||
//!
|
||
//! # サポートするプロバイダ
|
||
//!
|
||
//! - Anthropic (Claude)
|
||
//! - OpenAI (GPT-4, etc.)
|
||
//! - Google (Gemini)
|
||
//! - Ollama (ローカルLLM)
|
||
//!
|
||
//! # アーキテクチャ
|
||
//!
|
||
//! - [`LlmClient`] - プロバイダ共通のtrait
|
||
//! - `providers`: プロバイダ固有のクライアント実装
|
||
//! - `scheme`: APIスキーマ(リクエスト/レスポンス変換)
|
||
|
||
pub mod auth;
|
||
pub mod capability;
|
||
pub mod client;
|
||
pub mod error;
|
||
pub mod event;
|
||
pub mod types;
|
||
|
||
pub mod retry;
|
||
pub mod scheme;
|
||
pub mod transport;
|
||
|
||
pub use auth::*;
|
||
pub use capability::*;
|
||
pub use client::*;
|
||
pub use error::*;
|
||
pub use event::*;
|
||
pub use types::*;
|