{"id":32786658,"url":"https://github.com/jmanhype/req_llm_gateway","last_synced_at":"2026-05-12T12:42:24.142Z","repository":{"id":322263956,"uuid":"1087984255","full_name":"jmanhype/req_llm_gateway","owner":"jmanhype","description":"OpenAI-compatible LLM proxy with telemetry and multi-provider routing","archived":false,"fork":false,"pushed_at":"2025-11-03T14:08:02.000Z","size":428,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T15:18:34.744Z","etag":null,"topics":["elixir","gateway","llm","openai","phoenix","proxy","req","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmanhype.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2025-11-02T03:43:00.000Z","updated_at":"2025-11-03T14:09:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jmanhype/req_llm_gateway","commit_stats":null,"previous_names":["jmanhype/req_llm_gateway"],"tags_count":null,"template":false,"template_full_name":"github/spark-template","purl":"pkg:github/jmanhype/req_llm_gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmanhype%2Freq_llm_gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmanhype%2Freq_llm_gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmanhype%2Freq_llm_gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmanhype%2Freq_llm_gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmanhype","download_url":"https://codeload.github.com/jmanhype/req_llm_gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmanhype%2Freq_llm_gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282762578,"owners_count":26723111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-05T02:00:05.946Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elixir","gateway","llm","openai","phoenix","proxy","req","telemetry"],"created_at":"2025-11-05T05:01:30.010Z","updated_at":"2026-05-12T12:42:24.133Z","avatar_url":"https://github.com/jmanhype.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReqLLMGateway\n\nOpenAI-compatible HTTP proxy for LLM providers. Implemented as a Plug that can be mounted in any Phoenix or Plug-based application. Routes requests to multiple providers through ReqLLM.\n\n## Status\n\n| Metric | Value |\n|--------|-------|\n| Version | 0.1.0 |\n| Elixir | \u003e= 1.14 |\n| Runtime deps | 10 |\n| Dev/test deps | 5 |\n| Modules (.ex) | 12 |\n| Test files | 5 |\n| CI | No dedicated CI workflow (last run was a devcontainer update, failed) |\n| Hex published | No (package metadata is configured in mix.exs) |\n\n## What it does\n\n- Exposes an OpenAI-compatible `/v1/chat/completions` endpoint.\n- Delegates to ReqLLM for provider routing. Provider is selected by model string prefix (e.g., `openai:gpt-4`, `anthropic:claude-3-sonnet`).\n- Tracks usage in ETS (no database required).\n- Emits telemetry events for request lifecycle.\n- Includes a LiveDashboard page for usage stats.\n- Rate limiting via Hammer.\n- Model name parsing and cost estimation via built-in pricing tables.\n\n## Setup\n\n```bash\ngit clone https://github.com/jmanhype/req_llm_gateway\ncd req_llm_gateway\nmix deps.get\nmix test --no-start\n```\n\n### Mount in a Phoenix app\n\n```elixir\n# router.ex\nscope \"/v1\" do\n  forward \"/chat/completions\", ReqLLMGateway.Plug\nend\n\n# Optional: LiveDashboard page\nlive_dashboard \"/dashboard\",\n  additional_pages: [req_llm: ReqLLMGateway.LiveDashboard]\n```\n\n### Standalone demo\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nmix run -e \"ReqLLMGateway.Application.start(:normal, [])\"\n# or\nmix demo\n```\n\n## Modules\n\n| Module | Purpose |\n|--------|---------|\n| `ReqLLMGateway.Plug` | Plug endpoint, request handling |\n| `ReqLLMGateway.LLMClient` | ReqLLM wrapper |\n| `ReqLLMGateway.ModelParser` | Parses `provider:model` strings |\n| `ReqLLMGateway.Pricing` | Cost calculation per model |\n| `ReqLLMGateway.Usage` | ETS-based usage tracking |\n| `ReqLLMGateway.Telemetry` | Telemetry event definitions |\n| `ReqLLMGateway.LiveDashboard` | Phoenix LiveDashboard page |\n| `ReqLLMGateway.Application` | OTP application |\n| `ReqLLMGateway.DemoEndpoint` | Standalone demo server |\n| `ReqLLMGateway.DemoRouter` | Demo routing |\n| `Mix.Tasks.Demo` | `mix demo` task |\n\n## Dependencies\n\n| Dependency | Purpose |\n|-----------|---------|\n| plug ~\u003e 1.14 | HTTP interface |\n| jason ~\u003e 1.4 | JSON codec |\n| plug_cowboy ~\u003e 2.6 | HTTP server |\n| telemetry ~\u003e 1.2 | Event emission |\n| phoenix_live_dashboard ~\u003e 0.8 | Dashboard UI |\n| req_llm ~\u003e 1.0.0-rc.6 | LLM provider routing |\n| decimal ~\u003e 2.1 | Cost arithmetic |\n| hammer ~\u003e 6.1 | Rate limiting |\n| telemetry_metrics ~\u003e 0.6 | Metric definitions |\n| telemetry_poller ~\u003e 1.0 | Periodic measurements |\n\n## Limitations\n\n- No CI workflow for tests. The only GitHub Action is a devcontainer build.\n- req_llm is at release candidate (1.0.0-rc.6); API may change.\n- Usage tracking is ETS-only. Data is lost on restart.\n- Pricing tables are static and will drift from actual provider pricing.\n- 5 test files for 12 modules. Coverage is partial.\n- Not published to Hex despite having package metadata configured.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmanhype%2Freq_llm_gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmanhype%2Freq_llm_gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmanhype%2Freq_llm_gateway/lists"}