{"repo":"voocel/litellm","free":true,"listed":false,"github":"https://github.com/voocel/litellm","clone":"git clone https://github.com/voocel/litellm.git","description":"LiteLLM for Go, the easiest way to write LLM-based programs in Go","language":"Go","stars":62,"topics":["claude","gateway","gemini","go","litellm","llm","openai","ai"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"LiteLLM Go 中文 English LiteLLM is a small, explicit Go SDK for calling LLM providers through one typed core model. The root package owns the provider-agnostic API; concrete providers live in provider/ subpackages. Install Quick Start openai.NewClient(cfg, opts...) builds the provider first, then returns a ready litellm.Client ; every provider package exposes it. The explicit two-step form — provider, := openai.New(cfg) then litellm.New(provider, opts...) — is equivalent; prefer it when you want to share one provider across multiple clients. Both forms accept the same ClientOption s. Core Model Messages and responses use ordered Block values: - TextBlock - ImageBlock - ReasoningBlock - ToolUseBlock - ToolResultBlock - ToolReferenceBlock Response.Blocks is the canonical response content. Text() , Reasoning() , and ToolCalls() are convenience views. For multi-turn tool workflows, append the previous response blocks directly: JSONRaw returns marshal errors instead of silently producing invalid tool arguments. Use MustJSONRaw only for static test data or package-level examples where panic is acceptable. By default the SDK validates message history strictly. Dirty tool histories, invalid tool IDs, missing tool results, and unsupported provider options return errors. If you need to import legacy history, enable repair explicitly: Repairs and provider normalizations that change observable data are exposed through Response.Warnings , WarningEvent , and Hook.OnWarning . Raw provider res","default_branch":null,"files":null,"tree":[],"storefront":"/r/voocel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/voocel/litellm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}