{"id":22526779,"url":"https://github.com/yinheli/openai-relay","last_synced_at":"2025-03-28T04:19:35.978Z","repository":{"id":259904751,"uuid":"879807186","full_name":"yinheli/openai-relay","owner":"yinheli","description":"A Simple OpenAI API relay service built with Bun runtime, supporting various OpenAI-compatible backend services.","archived":false,"fork":false,"pushed_at":"2025-03-18T03:10:26.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T04:22:44.085Z","etag":null,"topics":["openai-proxy","openai-relay"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/yinheli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-10-28T15:25:02.000Z","updated_at":"2025-03-18T03:08:54.000Z","dependencies_parsed_at":"2024-10-28T17:26:56.029Z","dependency_job_id":"cca12a18-53a9-49d9-9ab7-66b7c675adf8","html_url":"https://github.com/yinheli/openai-relay","commit_stats":null,"previous_names":["yinheli/openai-relay"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinheli%2Fopenai-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinheli%2Fopenai-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinheli%2Fopenai-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinheli%2Fopenai-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yinheli","download_url":"https://codeload.github.com/yinheli/openai-relay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245967081,"owners_count":20701781,"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","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":["openai-proxy","openai-relay"],"created_at":"2024-12-07T06:18:33.791Z","updated_at":"2025-03-28T04:19:35.965Z","avatar_url":"https://github.com/yinheli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Relay\n\n![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=flat\u0026logo=kubernetes\u0026logoColor=white)\n![Helm](https://img.shields.io/badge/helm-%230F1689.svg?style=flat\u0026logo=helm\u0026logoColor=white)\n[![Docker Pulls](https://img.shields.io/docker/pulls/yinheli/openai-relay)](https://hub.docker.com/r/yinheli/openai-relay)\n![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=flat\u0026logo=typescript\u0026logoColor=white)\n![CI-Build](https://github.com/yinheli/openai-relay/actions/workflows/build.yaml/badge.svg?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Purpose\n\nThis project is a lightweight OpenAI API relay service that enables routing requests to different OpenAI-compatible\nbackend services based on model prefixes. It features seamless integration with Kubernetes through Helm charts for easy\ndeployment and scaling.\n\n## Features\n\n- 🚀 Built with Deno runtime\n- 🔄 Compatible with OpenAI API specification\n- 🎮 Easy configuration through environment variables\n- 🚢 Kubernetes deployment support with Helm charts\n\n## Installation\n\n### Using Helm Charts\n\n1. **Add the Helm repository**:\n   ```bash\n   helm repo add openai-relay https://yinheli.github.io/openai-relay\n   ```\n\n2. **Update your Helm repositories**:\n   ```bash\n   helm repo update\n   ```\n\n3. **Install the chart**:\n   ```bash\n   helm install openai-relay openai-relay/openai-relay\n   ```\n\n4. **Configuration**: You can customize the installation by providing a `values.yaml` file. Below are the default values\n   you can override:\n\n   ```yaml\n   replicaCount: 1\n\n   image:\n     repository: yinheli/openai-relay\n     pullPolicy: IfNotPresent\n     tag: \"\"\n\n   service:\n     type: ClusterIP\n     port: 80\n\n   ingress:\n     enabled: false\n     hosts:\n       - host: chart-example.local\n         paths:\n           - path: /\n             pathType: ImplementationSpecific\n\n   resources: {}\n\n   # environment variables\n   envVars:\n     RELAY_PROVIDER_SILICONCLOUD: https://api.siliconflow.cn\n     RELAY_MODEL_SILICONCLOUD: siliconcloud-gpt-4o,siliconcloud-gpt-4o-mini\n     RELAY_API_KEY_SILICONCLOUD: sk-siliconcloud-api-key\n   ```\n\n5. **Accessing the Service**: Once installed, you can access the service through the specified service type and port.\n\nFor more detailed configuration options, refer to the `values.yaml` and `config.ts` file in the repository.\n\n### Using Docker\n\nYou can run the OpenAI Relay service using Docker:\n\n```bash\ndocker run -d \\\n  --name openai-relay \\\n  -e RELAY_PROVIDER_SILICONCLOUD=https://api.siliconflow.cn \\\n  -e RELAY_MODEL_SILICONCLOUD=siliconcloud-gpt-4o,siliconcloud-gpt-4o-mini \\\n  -e RELAY_API_KEY_SILICONCLOUD=sk-siliconcloud-api-key \\\n  -p 80:80 \\\n  yinheli/openai-relay:latest\n```\n\n\u003e [!NOTE]\n\u003e You can customize the environment variables to fit your needs. and pay attention to the docker image tag, you may need\n\u003e to replace it with the release tag.\n\n### Run directly with Deno\n\n```bash\ndeno run -A --env-file=.env jsr:@yinheli/openai-relay\n```\n\n## Contributors\n\n![Contributors](https://contrib.rocks/image?repo=yinheli/openai-relay)\n\n## Contributing\n\nWe welcome contributions to improve the OpenAI Relay service. Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for\nguidelines on how to submit improvements and bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinheli%2Fopenai-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinheli%2Fopenai-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinheli%2Fopenai-relay/lists"}