{"id":48999909,"url":"https://github.com/nyroway/nyro","last_synced_at":"2026-05-19T05:02:04.334Z","repository":{"id":336992903,"uuid":"1151947147","full_name":"nyroway/nyro","owner":"nyroway","description":"Self-hosted AI Gateway — connect Claude Code, Codex, Gemini CLI and any SDK to any model provider with protocol translation.","archived":false,"fork":false,"pushed_at":"2026-04-13T06:25:52.000Z","size":55233,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-13T08:25:05.774Z","etag":null,"topics":["ai","ai-gateway","ai-proxy","claude-proxy","gateway","gemini-proxy","llm-gateway","llm-router","mcp-gateway","openai-proxy"],"latest_commit_sha":null,"homepage":"","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/nyroway.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://gitee.com/nyro/nyro?donate=true"]}},"created_at":"2026-02-07T05:47:35.000Z","updated_at":"2026-04-13T06:25:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nyroway/nyro","commit_stats":null,"previous_names":["shuaijinchao/nyro","nyro-way/nyro","nyroway/nyro"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/nyroway/nyro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyroway%2Fnyro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyroway%2Fnyro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyroway%2Fnyro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyroway%2Fnyro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyroway","download_url":"https://codeload.github.com/nyroway/nyro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyroway%2Fnyro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31978808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: 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":["ai","ai-gateway","ai-proxy","claude-proxy","gateway","gemini-proxy","llm-gateway","llm-router","mcp-gateway","openai-proxy"],"created_at":"2026-04-18T18:02:14.472Z","updated_at":"2026-05-19T05:02:04.237Z","avatar_url":"https://github.com/nyroway.png","language":"Rust","funding_links":["https://gitee.com/nyro/nyro?donate=true"],"categories":["*Ops for AI"],"sub_categories":["LLMOps"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"120\" src=\"docs/images/NYRO-logo.png\"\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eNyro AI Gateway\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  Run your AI coding tools on any model, from any provider.\u003cbr\u003e\n  One gateway. All protocols. No code changes.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/nyroway/nyro/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/nyroway/nyro\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"README_CN.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/文档-中文-8A2BE2\" alt=\"中文\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/NYRO-ui-home-en.png\" width=\"800\"\u003e\n\u003c/p\u003e\n\n---\n\n## What is Nyro?\n\nNyro is a local AI gateway that sits between your AI tools and model providers. It translates protocol formats on the fly — so Claude Code, Codex CLI, Gemini CLI, OpenCode, and any client using OpenAI / Anthropic / Gemini SDKs can all route through any backend model you choose, without changing a single line of code.\n\nPoint your clients at `http://localhost:19530`. Nyro handles the rest.\n\n```\nClaude Code · Codex CLI · Gemini CLI · OpenCode\n     OpenAI SDK · Anthropic SDK · Gemini SDK\n              Any HTTP API Client\n                      ↓\n              Nyro AI Gateway\n            (localhost:19530)\n                      ↓\n    OpenAI · Anthropic · Google · DeepSeek\n    MiniMax · xAI · Zhipu · Ollama · ...\n```\n\nNyro ships as a **desktop app** (macOS / Windows / Linux) and a **standalone server binary** for headless and self-hosted deployments.\n\n---\n\n## Why Nyro?\n\n**Use any model with any tool.** Claude Code expects Anthropic protocol. Codex CLI uses OpenAI Responses API. Gemini CLI speaks Gemini. Nyro translates between all three so one model can serve all your tools simultaneously.\n\n**Switch providers without touching your tools.** Change the target model or provider from Nyro's UI. Your tools never need reconfiguring.\n\n**Keep everything local.** API keys are encrypted at rest with AES-256-GCM. Requests stay on your machine. No cloud relay, no shared infrastructure.\n\n**One UI for everything.** Manage providers, routes, API keys, logs, and usage stats from a single interface — desktop app or browser.\n\n---\n\n## Screenshots\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\u003cimg src=\"docs/images/NYRO-ui-providers-add-en.png\" height=\"260\"\u003e\u003cbr\u003e\u003csub\u003eProvider Management\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\u003cimg src=\"docs/images/NYRO-ui-routes-en.png\" height=\"260\"\u003e\u003cbr\u003e\u003csub\u003eRoute Configuration\u003c/sub\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\u003cimg src=\"docs/images/NYRO-ui-apikeys-en.png\" height=\"260\"\u003e\u003cbr\u003e\u003csub\u003eAPI Key Management\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\u003cimg src=\"docs/images/NYRO-ui-connect-en.png\" height=\"260\"\u003e\u003cbr\u003e\u003csub\u003eConnect — Code \u0026 CLI Integration\u003c/sub\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Features\n\n### Protocol Translation\n\n- **Ingress**: OpenAI (Chat Completions + Responses API), Anthropic Messages, Gemini GenerateContent\n- **Egress**: route to any OpenAI-compatible, Anthropic, or Gemini upstream\n- **Streaming**: full SSE passthrough and cross-protocol format conversion\n- **Reasoning**: `\u003cthink\u003e` tag parsing and conversion across protocol boundaries\n- **Tool calls**: cross-protocol tool call and result format normalization\n- **Route types**: chat and embedding routes with type-aware handling\n\n### Routing\n\n- Exact match routing on `virtual_model`\n- Virtual model names decouple client requests from actual backend models\n- Multi-target routing with strategy selection: weighted load balancing or priority-based failover\n- Health-aware failover: 3 consecutive failures mark a target unhealthy, auto-recovery after 30s\n- Per-route access control with API key authorization\n\n### Caching\n\n- **Exact cache**: identical requests return cached responses instantly\n- **Semantic cache**: embedding-based similarity matching reuses results for similar queries\n- Per-route TTL and threshold overrides\n- Stream replay for cached streaming responses\n\n### Model Capabilities\n\n- Auto-detect model capabilities (tool call, reasoning, context window, modalities, costs)\n- `ai://models.dev` built-in data source for offline capability lookup\n- HTTP model list endpoints for dynamic model discovery\n- Capability tags shown in route configuration UI\n\n### Security\n\n- AES-256-GCM encrypted API key storage\n- Independent proxy and admin bearer token controls\n- Default-deny route authorization — keys must be explicitly bound to routes\n- Per-key quotas: RPM / RPD / TPM / TPD\n\n### Management\n\n- Full CRUD for providers, routes, and API keys\n- Request logs with provider, model, token, and latency detail\n- Usage charts by model and provider\n- Provider connectivity testing with live feedback\n- Configuration import / export\n\n### Connect — Integration\n\n**Code Integration** — select a route and copy ready-to-use examples for:\n\n| Protocol | Languages |\n|---------|---------|\n| OpenAI | Python · TypeScript · cURL |\n| Anthropic | Python · TypeScript · cURL |\n| Gemini | Python · TypeScript · cURL |\n\n**CLI Integration** — one-click config sync for AI coding tools:\n\n| Tool | Protocol |\n|------|---------|\n| Claude Code | Anthropic |\n| Codex CLI | OpenAI Responses API |\n| Gemini CLI | Gemini |\n| OpenCode | OpenAI |\n\nNyro detects installed tools, generates the correct configuration for the selected route, and writes it with one click. Original configs are backed up automatically.\n\n### Deployment\n\n**Desktop App**\n\n| Platform | Architecture |\n|---|---|\n| macOS | Apple Silicon (aarch64) · Intel (x64) |\n| Windows | x64 · ARM64 |\n| Linux | x86\\_64 · aarch64 |\n\n**Server Binary** — full mode (DB + Admin API + embedded WebUI) and standalone mode (YAML config only, no DB)\n\n| Platform | Architecture | Access |\n|---|---|---|\n| macOS | x86\\_64 · aarch64 | Proxy `:19530` · WebUI `http://localhost:19531` |\n| Linux | x86\\_64 · aarch64 | Proxy `:19530` · WebUI `http://localhost:19531` |\n| Windows | x64 · ARM64 | Proxy `:19530` · WebUI `http://localhost:19531` |\n\n---\n\n## Installation\n\n### Desktop App\n\n**Homebrew (macOS / Linux)**\n\n```bash\nbrew tap nyroway/nyro\nbrew install --cask nyro\n```\n\n**Shell Script**\n\n```bash\n# macOS / Linux\ncurl -fsSL https://raw.githubusercontent.com/nyroway/nyro/master/scripts/install/install.sh | bash\n\n# Windows (PowerShell)\nirm https://raw.githubusercontent.com/nyroway/nyro/master/scripts/install/install.ps1 | iex\n```\n\n**Manual Download**\n\nDownload the latest installer for your platform from [GitHub Releases](https://github.com/nyroway/nyro/releases/latest).\n\n\u003e **macOS**: After manual install run `sudo xattr -rd com.apple.quarantine /Applications/Nyro.app`, or use the install script which handles this automatically.\n\u003e\n\u003e **Windows**: SmartScreen may show \"Unknown publisher\" — click **More info → Run anyway**.\n\n### Server Binary\n\n```bash\n# Download\ncurl -LO https://github.com/nyroway/nyro/releases/latest/download/nyro-server-linux-x86_64\nchmod +x nyro-server-linux-x86_64\n\n# Start (localhost only, no auth required)\n./nyro-server-linux-x86_64\n\n# Start (network-exposed, auth required)\n./nyro-server-linux-x86_64 \\\n  --proxy-host 0.0.0.0 \\\n  --admin-host 0.0.0.0 \\\n  --admin-token YOUR_ADMIN_TOKEN\n\n# Standalone mode (YAML config, no DB/Admin/WebUI)\n./nyro-server-linux-x86_64 --config config.yaml\n```\n\nAvailable server binaries: `linux-x86_64`, `linux-aarch64`, `macos-x86_64`, `macos-aarch64`, `windows-x86_64.exe`, `windows-arm64.exe`\n\nOpen `http://localhost:19531` for the management UI. See [Server docs](docs/server/README.md) and [Standalone docs](docs/standalone/README.md) for full configuration reference.\n\n### PostgreSQL Storage Backend\n\nDefault behavior: local SQLite under `--data-dir`. To use PostgreSQL:\n\n```bash\n./nyro-server-linux-x86_64 \\\n  --storage-backend postgres \\\n  --postgres-dsn \"postgres://user:pass@host:5432/db\"\n```\n\nOr via environment variable:\n\n```bash\nexport NYRO_POSTGRES_DSN=\"postgres://user:pass@host:5432/db\"\n./nyro-server-linux-x86_64 --storage-backend postgres\n```\n\n### Docker\n\nPre-built server images are distributed via the separate [nyroway/docker-nyro](https://github.com/nyroway/docker-nyro) repository and published to Docker Hub as [nyroway/nyro](https://hub.docker.com/r/nyroway/nyro).\n\nQuick start:\n\n```bash\ndocker run --rm \\\n  -e NYRO_ADMIN_TOKEN=change-me \\\n  -p 19530:19530 \\\n  -p 19531:19531 \\\n  -v nyro-data:/var/lib/nyro \\\n  nyroway/nyro:latest\n```\n\nOpen `http://127.0.0.1:19531` for the management UI. Use the same `NYRO_ADMIN_TOKEN` value as the Bearer token for admin API requests.\n\nFor Postgres-backed deployments and `docker compose` usage, see the [docker-nyro README](https://github.com/nyroway/docker-nyro).\n\n---\n\n## Quick Start\n\n**1. Add a Provider**\n\nGo to **Providers → New**. Enter your provider's Base URL and API key. Nyro auto-detects the protocol from the URL.\n\n**2. Create a Route**\n\nGo to **Routes → New**. Set a virtual model name (e.g. `gpt-4o`), select your provider and target model. Enable access control if needed.\n\n**3. Point your client at Nyro**\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"http://127.0.0.1:19530/v1\",\n    api_key=\"your-proxy-key\"  # or \"no-auth\" if access control is off\n)\n\nresponse = client.chat.completions.create(\n    model=\"gpt-4o\",  # matches your virtual model name\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}]\n)\n```\n\n**4. Sync your AI tools (optional)**\n\nGo to **Connect**, select a route, and click **Sync** next to Claude Code, Codex, Gemini CLI, or OpenCode. Nyro writes the correct config automatically.\n\n---\n\n## License\n\n```\nCopyright 2026 The Nyro Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee the full license text in [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyroway%2Fnyro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyroway%2Fnyro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyroway%2Fnyro/lists"}