Expand description
Shared conversion logic for LiteLLM and OpenRouter JSON.
This module is included via #[path] in build.rs so the same parsing
logic runs at compile time and runtime. It depends only on serde,
serde_json, and sibling types.
Structs§
- Converted
Entry - Intermediate representation used by both build.rs and runtime.
- RawLiteLLM
Entry - Raw
LiteLLMentry as it appears in the JSON.
Functions§
- convert_
litellm_ entry - Convert a single
LiteLLMJSON entry into our intermediate representation. - parse_
litellm_ json - Parse the full
LiteLLMJSON blob and return converted entries. - parse_
mode - Map a
LiteLLMmodestring to a mode tag. - parse_
provider - Map a
LiteLLMlitellm_providerstring to a provider tag. - strip_
provider_ prefix - Strip known provider prefixes to get the canonical model ID.