codex-convert-proxy 0.1.0

A high-performance proxy server that converts between different AI API formats
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! 项目级配置常量

/// 最大请求体大小 (50 MB) - 支持长对话历史和大量 tools 定义
pub const MAX_REQUEST_BODY_SIZE: usize = 50 * 1024 * 1024;

/// 最大响应体大小 (100 MB) - 非流式完整响应
pub const MAX_RESPONSE_BODY_SIZE: usize = 100 * 1024 * 1024;

/// 流式解析缓冲区压缩阈值 (256 KB) - 减少 compact 频率
pub const STREAM_PARSE_COMPACT_THRESHOLD: usize = 256 * 1024;

/// 思考标签缓冲区最大大小 (100 MB)
pub const MAX_THINKING_BUFFER_SIZE: usize = 100 * 1024 * 1024;

/// 部分提供商允许的最小 max_tokens 值(低于此值可能被拒绝)
pub const MIN_MAX_TOKENS: u32 = 16;