mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
OCR transformations, BaseOcrConfig with its response and connection types, the OCR error, and the HTTP pieces (custom_httpx: http_handler, transport, media, llm_http_handler with OcrClient and the request/response handler) now live in litellm-llms at their Python paths. Provider code no longer reaches into the route: it gets the caller's hooks through a route-neutral CallHooks trait that core implements over its host, and core dispatches to llm_http_handler::ocr with the concrete config, the way Python calls base_llm_http_handler.ocr(provider_config=...). Core keeps the route: entrypoint, request types, credential fallback, provider dispatch, the machine and hook glue. ocr/mod.rs no longer re-exports anything, provider constants moved next to their only users, and provider tests that drive the whole route moved to core's route test files. Twenty-two of those were exact copies of tests already there and were dropped; every one still runs once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
25 lines
1.2 KiB
Rust
25 lines
1.2 KiB
Rust
pub const OPENAI_DEFAULT_API_BASE: &str = "https://api.openai.com";
|
|
|
|
/// Full-request timeout ceiling for Anthropic Messages provider calls, in
|
|
/// seconds. Mirrors the Python Anthropic Messages default. The per-request
|
|
/// timeout from the caller still overrides this on the request builder.
|
|
pub(crate) const MESSAGES_TIMEOUT_SECS: u64 = 600;
|
|
|
|
/// Connect timeout for Anthropic Messages provider calls, in seconds.
|
|
pub(crate) const MESSAGES_CONNECT_TIMEOUT_SECS: u64 = 10;
|
|
|
|
/// Provider name used for Anthropic Messages when a deployment's provider model
|
|
/// does not carry an explicit provider prefix.
|
|
pub const ANTHROPIC_MESSAGES_PROVIDER: &str = "anthropic";
|
|
|
|
/// Full-request timeout ceiling for chat completions provider calls, in
|
|
/// seconds. Mirrors the Python chat completions default.
|
|
pub(crate) const CHAT_COMPLETIONS_TIMEOUT_SECS: u64 = 600;
|
|
|
|
/// Connect timeout for chat completions provider calls, in seconds.
|
|
pub(crate) const CHAT_COMPLETIONS_CONNECT_TIMEOUT_SECS: u64 = 10;
|
|
|
|
pub(crate) const AUDIO_TRANSCRIPTION_TIMEOUT_SECS: u64 = 600;
|
|
|
|
/// `object` field every non-streaming chat completion response carries.
|
|
pub const CHAT_COMPLETION_OBJECT: &str = "chat.completion";
|