{
    "archive_path": "archive/1789164496.093991",
    "base_url": "github.com/kennethwolters/litelm",
    "basename": "litelm",
    "bookmarked_date": "2026-09-11 22:08",
    "canonical": {
        "archive_org_path": "https://web.archive.org/web/github.com/kennethwolters/litelm",
        "dom_path": "output.html",
        "favicon_path": "favicon.ico",
        "git_path": "git/",
        "google_favicon_path": "https://www.google.com/s2/favicons?domain=github.com",
        "headers_path": "headers.json",
        "htmltotext_path": "htmltotext.txt",
        "index_path": "index.html",
        "media_path": "media/",
        "mercury_path": "mercury/content.html",
        "pdf_path": "output.pdf",
        "readability_path": "readability/content.html",
        "screenshot_path": "screenshot.png",
        "singlefile_path": "singlefile.html",
        "warc_path": "warc/",
        "wget_path": "github.com/kennethwolters/litelm.html"
    },
    "domain": "github.com",
    "extension": "",
    "hash": "PCGKY7G5TSVWGBX1TF3Y",
    "history": {
        "archive_org": [],
        "dom": [],
        "favicon": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--output",
                    "favicon.ico",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://www.google.com/s2/favicons?domain=github.com"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-11T22:08:56.438115+00:00",
                "index_texts": null,
                "output": "favicon.ico",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:08:55.773603+00:00",
                "status": "succeeded"
            }
        ],
        "git": [],
        "headers": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--head",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://github.com/kennethwolters/litelm"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-11T22:08:57.129144+00:00",
                "index_texts": null,
                "output": "headers.json",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:08:56.448571+00:00",
                "status": "succeeded"
            }
        ],
        "htmltotext": [],
        "media": [],
        "mercury": [
            {
                "cmd": [
                    "/app/node_modules/@postlight/parser/cli.js",
                    "https://github.com/kennethwolters/litelm"
                ],
                "cmd_version": "1.0.0",
                "end_ts": "2026-09-11T22:09:11.729777+00:00",
                "index_texts": null,
                "output": "mercury",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:09:06.572785+00:00",
                "status": "succeeded"
            }
        ],
        "pdf": [],
        "readability": [
            {
                "cmd": [
                    "/app/node_modules/readability-extractor/readability-extractor",
                    "/tmp/tmpjnun7f59",
                    "https://github.com/kennethwolters/litelm"
                ],
                "cmd_version": "0.0.11",
                "end_ts": "2026-09-11T22:09:06.565712+00:00",
                "index_texts": [
                    "litelm\n\n\n\n\nlitellm's routing + translation in ~2,900 lines and 2 dependencies (openai, httpx).\nlitellm routes LLM calls across providers and translates between message formats. That core is buried under 100k+ LOC of proxy servers, caching layers, cost tracking, and dozens of features most users never touch. litelm extracts just the call path \u2014 model routing, message translation, streaming, tool use, embeddings \u2014 and nothing else. No Router class, no proxy, no caching.\nInstall\npip install litelm                # openai + httpx\npip install litelm[anthropic]     # + anthropic SDK\npip install litelm[bedrock]       # + boto3\npip install litelm[all]           # everything\nUsage\nimport litelm\n\n# Basic completion\nresponse = litelm.completion(\"openai/gpt-4o\", messages=[{\"role\": \"user\", \"content\": \"Hello!\"}])\nprint(response.choices[0].message.content)\n\n# Streaming\nfor chunk in litelm.completion(\"groq/llama-3.1-70b-versatile\", messages=[...], stream=True):\n    print(chunk.choices[0].delta.content or \"\", end=\"\")\n\n# Embeddings\nresponse = litelm.embedding(\"openai/text-embedding-3-small\", input=[\"hello world\"])\nEvery function has an async variant: acompletion, aembedding, aresponses, atext_completion.\nThe API mirrors litellm \u2014 same function names, same arguments, same response types. If you're using litellm today, switching is s/litellm/litelm/ in your imports.\nWhat's in / what's out\n\n\n\n\nlitellm\nlitelm\n\n\n\n\nModel routing (provider/model \u2192 right endpoint)\n\u2713\n\u2713\n\n\nMessage translation (Anthropic, Bedrock, Cloudflare, Mistral)\n\u2713\n\u2713\n\n\nStreaming + stream_chunk_builder\n\u2713\n\u2713\n\n\nTool use (function calling)\n\u2713\n\u2713\n\n\nEmbeddings\n\u2713\n\u2713\n\n\nText completions\n\u2713\n\u2713\n\n\nOpenAI Responses API\n\u2713\n\u2713\n\n\nMock responses\n\u2713\n\u2713\n\n\nRouter (load balancing, fallbacks)\n\u2713\n\u2717\n\n\nProxy server\n\u2713\n\u2717\n\n\nCaching / budgeting / cost tracking\n\u2713\n\u2717\n\n\nToken counting\n\u2713\n\u2717\n\n\nImage gen, audio, OCR, fine-tuning\n\u2713\n\u2717\n\n\nAgents, guardrails, scheduler\n\u2713\n\u2717\n\n\n\nProviders\nRoutes to 19 providers via \"provider/model-name\" syntax. Any OpenAI-compatible endpoint works via api_base.\n\n\n\nProvider\nEnv Var\nHandler\nVerified\n\n\n\n\nOpenAI\nOPENAI_API_KEY\nOpenAI SDK\nYes\n\n\nAnthropic\nANTHROPIC_API_KEY\nCustom\nYes\n\n\nGroq\nGROQ_API_KEY\nOpenAI-compat\nYes\n\n\nMistral\nMISTRAL_API_KEY\nCustom\nYes\n\n\nxAI\nXAI_API_KEY\nOpenAI-compat\nYes\n\n\nOpenRouter\nOPENROUTER_API_KEY\nOpenAI-compat\nYes\n\n\nAzure\nAZURE_API_KEY\nOpenAI SDK (Azure)\nYes\n\n\nBedrock\nAWS_ACCESS_KEY_ID\nCustom\nNo\n\n\nCloudflare\nCLOUDFLARE_API_TOKEN\nCustom\nNo\n\n\nTogether\nTOGETHERAI_API_KEY\nOpenAI-compat\nNo\n\n\nFireworks\nFIREWORKS_API_KEY\nOpenAI-compat\nNo\n\n\nDeepSeek\nDEEPSEEK_API_KEY\nOpenAI-compat\nNo\n\n\nPerplexity\nPERPLEXITYAI_API_KEY\nOpenAI-compat\nNo\n\n\nDeepInfra\nDEEPINFRA_API_TOKEN\nOpenAI-compat\nNo\n\n\nGemini\nGEMINI_API_KEY\nOpenAI-compat\nNo\n\n\nCohere\nCOHERE_API_KEY\nOpenAI-compat\nNo\n\n\nOllama\n\u2014\nOpenAI-compat\nNo\n\n\nvLLM\n\u2014\nOpenAI-compat\nNo\n\n\nLM Studio\n\u2014\nOpenAI-compat\nNo\n\n\n\nAPI Keys\nSet the environment variable for your provider:\nexport OPENAI_API_KEY=sk-...\nexport ANTHROPIC_API_KEY=sk-ant-...\nOr pass directly:\nlitelm.completion(\"openai/gpt-4o\", messages=[...], api_key=\"sk-...\")\nlitelm.completion(\"openai/gpt-4o\", messages=[...], api_base=\"http://localhost:8000/v1\")\nError Handling\nAll provider errors are mapped to litelm's exception hierarchy:\nfrom litelm import ContextWindowExceededError, RateLimitError, AuthenticationError\n\ntry:\n    response = litelm.completion(\"openai/gpt-4o\", messages=messages)\nexcept ContextWindowExceededError:\n    # prompt too long \u2014 truncate and retry\n    pass\nexcept RateLimitError:\n    # back off\n    pass\nexcept AuthenticationError:\n    # bad API key\n    pass\nTool Calling\ntools = [{\"type\": \"function\", \"function\": {\n    \"name\": \"get_weather\",\n    \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}},\n}}]\n\nresponse = litelm.completion(\n    \"openai/gpt-4o\", messages=[{\"role\": \"user\", \"content\": \"Weather in Paris?\"}],\n    tools=tools, tool_choice=\"required\",\n)\ntool_call = response.choices[0].message.tool_calls[0]\nprint(tool_call.function.name, tool_call.function.arguments)\nCustom / Local Providers\nAny OpenAI-compatible server works via api_base:\n# vLLM\nlitelm.completion(\"openai/my-model\", messages=[...], api_base=\"http://localhost:8000/v1\")\n\n# Ollama\nlitelm.completion(\"ollama/llama3\", messages=[...], api_base=\"http://localhost:11434/v1\")\n\n# LM Studio\nlitelm.completion(\"openai/local-model\", messages=[...], api_base=\"http://localhost:1234/v1\")\nDevelopment transparency\nlitelm is human-directed, AI-assisted software. Much of the code was written with Claude Code using Claude Opus 4.6/4.7. Code written from 2026-05-14 onward is written through Pi using GPT-5.5. Compatibility claims are based on tests and maintainer review, not AI authorship.\nUpstream attestation\nMaintainer attestation, 2026-09-11: LiteLLM's routing/formatting changes were reviewed from 649eb2d through 9a715df2. The audit triaged 360 core-path commits, inspected upstream tests for potentially relevant behavior, and fixed the resulting compatibility gaps test-first. Local scoped tests: 262 passed, 55 skipped; all 45 available-provider live tests and all 10 DSPy smoke tests also passed with the current dependency lock.\nThis attests litelm's declared routing/formatting/DSPy surface only, not full litellm compatibility.\nStatus\nAlpha. 262 own tests passing. The current scoped LiteLLM 9a715df2 baseline has 75 passing ported tests and no remaining actionable assertion/runtime failures.\nDSPy drop-in verified \u2014 all 7 execution paths proven live (Predict, CoT, typed signatures, streaming, embeddings, tool use, multi-output).\nTests\nuv run --extra all pytest tests/ -x --ignore=tests/ported --timeout=10  # 262 non-live tests\nbash scripts/ported_contract.sh                                        # 49 fast upstream contract tests\nuv run --extra all pytest tests/test_live.py -m live --timeout=30       # 45 live provider tests\nuv run pytest tests/test_dspy_smoke.py -m live --timeout=60             # 10 DSPy integration tests\nLive tests require API keys in .env.test. Skipped by default; run with -m live."
                ],
                "output": "readability",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:09:03.414836+00:00",
                "status": "succeeded"
            }
        ],
        "screenshot": [],
        "singlefile": [],
        "title": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://github.com/kennethwolters/litelm"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-11T22:09:03.407564+00:00",
                "index_texts": null,
                "output": "GitHub - kennethwolters/litelm: litellm without the bloat \u00b7 GitHub",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:09:03.333808+00:00",
                "status": "succeeded"
            }
        ],
        "wget": [
            {
                "cmd": [
                    "wget",
                    "--no-verbose",
                    "--adjust-extension",
                    "--convert-links",
                    "--force-directories",
                    "--backup-converted",
                    "--span-hosts",
                    "--no-parent",
                    "-e",
                    "robots=off",
                    "--timeout=120",
                    "--restrict-file-names=windows",
                    "--warc-file=/data/archive/1789164496.093991/warc/1789164537",
                    "--page-requisites",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) wget/GNU Wget 1.21.3",
                    "--compression=auto",
                    "https://github.com/kennethwolters/litelm"
                ],
                "cmd_version": "GNU Wget 1.21.3",
                "end_ts": "2026-09-11T22:09:03.323851+00:00",
                "index_texts": null,
                "output": "github.com/kennethwolters/litelm.html",
                "pwd": "/data/archive/1789164496.093991",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-11T22:08:57.138273+00:00",
                "status": "succeeded"
            }
        ]
    },
    "icons": null,
    "is_archived": true,
    "is_static": false,
    "latest": {
        "archive_org": null,
        "dom": null,
        "favicon": "favicon.ico",
        "git": null,
        "media": null,
        "pdf": null,
        "screenshot": null,
        "singlefile": null,
        "title": "GitHub - kennethwolters/litelm: litellm without the bloat \u00b7 GitHub",
        "warc": null,
        "wget": "github.com/kennethwolters/litelm.html"
    },
    "link_dir": "/data/archive/1789164496.093991",
    "newest_archive_date": "2026-09-11T22:09:06.572785+00:00",
    "num_failures": 0,
    "num_outputs": 6,
    "oldest_archive_date": "2026-09-11T22:08:55.773603+00:00",
    "path": "/kennethwolters/litelm",
    "schema": "Link",
    "scheme": "https",
    "snapshot_id": "fdaebcf7-7742-4a83-a5dd-00fc9a73bee3",
    "sources": [
        "/data/sources/1789164496-import.txt"
    ],
    "tags": null,
    "tags_str": "",
    "timestamp": "1789164496.093991",
    "title": "GitHub - kennethwolters/litelm: litellm without the bloat \u00b7 GitHub",
    "updated": "2026-09-11T22:08:55.773145+00:00",
    "updated_date": "2026-09-11 22:08",
    "url": "https://github.com/kennethwolters/litelm"
}