{"id":44844196,"url":"https://github.com/modpotatodotdev/llmg","last_synced_at":"2026-02-23T06:01:46.133Z","repository":{"id":338911145,"uuid":"1159651829","full_name":"modpotatodotdev/LLMG","owner":"modpotatodotdev","description":"an llm provider gateway in rust, fully rig compatible","archived":false,"fork":false,"pushed_at":"2026-02-21T14:09:53.000Z","size":713,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-02-22T10:24:52.559Z","etag":null,"topics":["agentic","gateway","litellm","llm","openai","provider","rig"],"latest_commit_sha":null,"homepage":"https://modpotatodotdev.github.io/LLMG/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modpotatodotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T01:41:17.000Z","updated_at":"2026-02-21T14:09:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/modpotatodotdev/LLMG","commit_stats":null,"previous_names":["modpotatodotdev/llmg"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/modpotatodotdev/LLMG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modpotatodotdev%2FLLMG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modpotatodotdev%2FLLMG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modpotatodotdev%2FLLMG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modpotatodotdev%2FLLMG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modpotatodotdev","download_url":"https://codeload.github.com/modpotatodotdev/LLMG/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modpotatodotdev%2FLLMG/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29738517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T04:51:08.365Z","status":"ssl_error","status_checked_at":"2026-02-23T04:49:15.865Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","gateway","litellm","llm","openai","provider","rig"],"created_at":"2026-02-17T04:09:01.473Z","updated_at":"2026-02-23T06:01:46.073Z","avatar_url":"https://github.com/modpotatodotdev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLMG — LLM Gateway\n\nA high-performance Rust LLM gateway and provider library. One OpenAI-compatible API for **70+ LLM providers**.\n\n[![CI](https://github.com/modpotatodotdev/LLMG/actions/workflows/ci.yml/badge.svg)](https://github.com/modpotatodotdev/LLMG/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT)\n\n**[Documentation](https://modpotatodotdev.github.io/LLMG)**\n\n## Features\n\n- **Unified API** — Single OpenAI-compatible endpoint for every provider\n- **70+ Providers** — OpenAI, Anthropic, Azure, Groq, Mistral, Cohere, DeepSeek, Ollama, OpenRouter, and many more\n- **Library + Gateway** — Use as a Rust crate or deploy the HTTP gateway\n- **Feature-Gated** — Compile only the providers you need\n- **Streaming** — Server-Sent Events across all providers\n- **Rig Integration** — Drop-in provider for [Rig](https://github.com/0xPlaygrounds/rig) agents\n\n## Quick Start\n\n### Gateway\n\nInstall the gateway via cargo:\n\n```bash\ncargo install llmg-gateway\n```\n\nThen run it with your API keys:\n\n```bash\nOPENAI_API_KEY=sk-... llmg-gateway\n```\n\n```bash\ncurl -X POST http://localhost:8080/v1/chat/completions \\\n  -H \"Authorization: Bearer any-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"openai/gpt-4\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]}'\n```\n\n\u003e **Note:** The gateway requires an `Authorization: Bearer \u003ctoken\u003e` header. The token is not validated in the current release — any value works. See the [Authentication docs](https://modpotatodotdev.github.io/LLMG/gateway/authentication/) for details.\n\n### Docker\n\n```bash\ndocker pull ghcr.io/modpotatodotdev/llmg:latest\ndocker run -p 8080:8080 -e OPENAI_API_KEY=sk-... ghcr.io/modpotatodotdev/llmg:latest\n```\n\n### Library\n\n```toml\n[dependencies]\nllmg-core = \"0.1.15\"\nllmg-providers = { version = \"0.1.15\", features = [\"openai\"] }\n```\n\n```rust\nuse llmg_core::provider::{Provider, ProviderRegistry, RoutingProvider};\nuse llmg_core::types::{ChatCompletionRequest, Message};\n\n// 1. Create registry and auto-load from env (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)\nlet mut registry = ProviderRegistry::new();\nllmg_providers::utils::register_all_from_env(\u0026mut registry);\n\n// 2. Create the provider-agnostic client\nlet client = RoutingProvider::new(registry);\n\n// 3. Use \"provider/model\" routing syntax\nlet request = ChatCompletionRequest {\n    model: \"openai/gpt-4\".to_string(), // Routes to OpenAI\n    messages: vec![Message::User { content: \"Hello!\".to_string(), name: None }],\n    ..Default::default()\n};\nlet response = client.chat_completion(request).await?;\n```\n\n## How Routing Works\n\nRequests use the `provider/model` format:\n\n```\nopenai/gpt-4              → OpenAI\nanthropic/claude-3-opus   → Anthropic\ngroq/llama3-70b-8192      → Groq\nollama/llama3             → Ollama (local)\nopenrouter/openai/gpt-4   → OpenRouter (nested)\n```\n\nBuilt-in aliases let you use short names like `gpt-4`, `claude`, or `gemini`.\n\n## Project Structure\n\n| Crate | Purpose |\n|-------|---------|\n| `llmg-core` | Shared types, traits, error handling |\n| `llmg-providers` | Provider implementations (feature-gated) |\n| `llmg-gateway` | HTTP gateway server (Axum) |\n\n## Configuration\n\nSet API keys as environment variables. The gateway auto-registers providers based on which keys are present.\n\n```bash\nOPENAI_API_KEY=sk-...\nANTHROPIC_API_KEY=sk-ant-...\nGROQ_API_KEY=gsk_...\n```\n\nSee the [documentation](https://modpotatodotdev.github.io/LLMG/providers/all/) for the full list of providers and their environment variables.\n\n## License\n\nLicensed under either of [Apache License 2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT) at your option.\n\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodpotatodotdev%2Fllmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodpotatodotdev%2Fllmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodpotatodotdev%2Fllmg/lists"}