mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-31 19:22:15 +08:00
refactor(proxy): extract format transform into standalone module
- Create new `proxy/transform/` module with clean architecture: - `traits.rs`: FormatTransformer trait definition - `format.rs`: ApiFormat enum (Anthropic, OpenAI, Gemini) - `registry.rs`: TransformerRegistry with global instance - `config.rs`: TransformConfig from Provider settings - `anthropic_openai/`: Bidirectional Anthropic ↔ OpenAI converters - Move streaming transform from providers/ to transform/ - Remove legacy transform code from providers/adapter.rs and claude.rs - Update handlers.rs to use new transform module This refactor improves maintainability and makes it easier to add new format converters in the future.
This commit is contained in:
@@ -22,6 +22,7 @@ pub mod response_processor;
|
||||
pub(crate) mod server;
|
||||
pub mod session;
|
||||
pub mod thinking_rectifier;
|
||||
pub mod transform;
|
||||
pub(crate) mod types;
|
||||
pub mod usage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user