{"id":29031637,"url":"https://github.com/xrip/ollama-api-proxy","last_synced_at":"2026-03-27T02:30:37.262Z","repository":{"id":300739352,"uuid":"1007013080","full_name":"xrip/ollama-api-proxy","owner":"xrip","description":"NPX/Docker package that creates Ollama API server and forward requests to Gemni/OpenAI/Deepseek/Kimi K2. Mainly purpose to use Free tier APIs in Jetbrains AI Assistant","archived":false,"fork":false,"pushed_at":"2025-10-05T07:37:18.000Z","size":58,"stargazers_count":12,"open_issues_count":2,"forks_count":6,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T07:45:50.696Z","etag":null,"topics":["ai","deepseek","gemni","ollama","openai","openrouter","proxy"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/xrip.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-06-23T10:30:20.000Z","updated_at":"2025-10-05T07:36:19.000Z","dependencies_parsed_at":"2025-06-23T12:24:42.287Z","dependency_job_id":null,"html_url":"https://github.com/xrip/ollama-api-proxy","commit_stats":null,"previous_names":["xrip/ollama-proxy","xrip/ollama-api-proxy"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xrip/ollama-api-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrip%2Follama-api-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrip%2Follama-api-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrip%2Follama-api-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrip%2Follama-api-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xrip","download_url":"https://codeload.github.com/xrip/ollama-api-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrip%2Follama-api-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31009975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T01:56:05.093Z","status":"online","status_checked_at":"2026-03-27T02:00:08.055Z","response_time":164,"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":["ai","deepseek","gemni","ollama","openai","openrouter","proxy"],"created_at":"2025-06-26T10:04:50.401Z","updated_at":"2026-03-27T02:30:37.254Z","avatar_url":"https://github.com/xrip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ollama to OpenAI/Gemini/OpenRouter Proxy\n\n[![Version](https://img.shields.io/badge/version-1.0.4-blue.svg)](https://github.com/xrip/ollama-api-proxy)\n\nA Multi-Provider Ollama Proxy Server that allows using JetBrains AI Assistant with third-party commercial LLMs like\nOpenAI, Google Gemini, and OpenRouter, taking advantage of their free tier usage. Especially for Kimi K2 and Deepseek R1\n\n## Overview\n\nThis proxy server translates requests from the Ollama API format to OpenAI, Google Gemini, or OpenRouter API formats,\nallowing\nyou to use these commercial LLMs with tools that support the Ollama API, such as JetBrains AI Assistant.\n\nThe server runs on port 11434 by default (the same port as Ollama) and requires API keys for OpenAI, Gemini, and/or\nOpenRouter, configured via\nenvironment variables.\n\n## Features\n\n- Seamless integration with JetBrains AI Assistant\n- Support for multiple LLM providers:\n    - OpenAI models\n    - Google Gemini models\n  - OpenRouter models\n- Compatible with Ollama API endpoints:\n    - `/api/chat` - for chat completions\n    - `/api/generate` - for text generation\n    - `/api/tags` - for listing available models\n    - `/api/version` - for version information\n\n## Supported Models\n\nThe proxy server supports a variety of models from OpenAI, Google Gemini, and OpenRouter. The default configurations\nare:\n\n### OpenAI Models\n\n- gpt-4o-mini\n- gpt-4.1-mini\n- gpt-4.1-nano\n\n### Google Gemini Models\n\n- gemini-2.5-flash\n- gemini-2.5-flash-lite-preview-06-17\n\n### OpenRouter Models\n\n- deepseek-r1\n\n## Customizing Models\n\nYou can customize the available models by creating a `models.json` file in the directory where you run the proxy server.\nThis file should contain a JSON object where keys are the model names you want to expose, and values are objects\nspecifying the `provider` (e.g., `openai`, `google`, `openrouter`) and the actual `model` name as expected by the\nrespective API.\n\nIf a `models.json` file is found in the current working directory, the proxy will load models from it. Otherwise, it\nwill use the built-in default models.\n\n**Example `models.json`:**\n\n```json\n{\n    \"my-custom-gpt\": { \"provider\": \"openai\", \"model\": \"gpt-4o-mini\" },\n    \"my-gemini-pro\": { \"provider\": \"google\", \"model\": \"gemini-pro\" },\n    \"my-openrouter-model\": { \"provider\": \"openrouter\", \"model\": \"mistralai/mistral-7b-instruct-v0.2\" }\n}\n```\n\nThis allows you to rename models, add new ones supported by the providers, or remove models you don't intend to use.\n\n## Installation\n\n### Prerequisites\n\n- Node.js \u003e= 18.0.0 or Bun \u003e= 1.2.0\n- API key for OpenAI, Google Gemini, and/or OpenRouter\n\n### Using npm\n\n```bash\n# Clone the repository\ngit clone https://github.com/xrip/ollama-api-proxy.git\ncd ollama-api-proxy\n\n# Install dependencies\nnpm install\n\n# Create .env file with your API keys\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e .env\necho \"GEMINI_API_KEY=your_gemini_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_URL=your_openrouter_api_url\" \u003e\u003e .env  # optional, default is https://openrouter.ai/api/v1\n\n# Start the server\nnpm start\n```\n\n### Using Docker\n\n```bash\n# Clone the repository\ngit clone https://github.com/xrip/ollama-api-proxy.git\ncd ollama-api-proxy\n\n# Create .env file with your API keys\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e .env\necho \"GEMINI_API_KEY=your_gemini_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_URL=your_openrouter_api_url\" \u003e\u003e .env  # optional, default is https://openrouter.ai/api/v1\n\n# Build and run the Docker container\ndocker build -t ollama-proxy .\ndocker run -p 11434:11434 --env-file .env ollama-proxy\n```\n\n### Using npx (Node.js)\n\n```bash\n# Create a directory for your configuration\nmkdir ollama-proxy-config\ncd ollama-proxy-config\n\n# Create .env file with your API keys\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e .env\necho \"GEMINI_API_KEY=your_gemini_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_URL=your_openrouter_api_url\" \u003e\u003e .env  # optional, default is https://openrouter.ai/api/v1\n\n# Run the proxy server using npx\nnpx ollama-api-proxy\n\n# Alternatively, you can specify a specific version\n# npx ollama-api-proxy@1.0.0\n```\n\n### Using bunx (Bun)\n\n```bash\n# Create a directory for your configuration\nmkdir ollama-proxy-config\ncd ollama-proxy-config\n\n# Create .env file with your API keys\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e .env\necho \"GEMINI_API_KEY=your_gemini_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" \u003e\u003e .env\necho \"OPENROUTER_API_URL=your_openrouter_api_url\" \u003e\u003e .env  # optional, default is https://openrouter.ai/api/v1\n\n# Run the proxy server using bunx\nbunx ollama-api-proxy\n\n# Alternatively, you can specify a specific version\n# bunx ollama-api-proxy@1.0.0\n```\n\n## Configuration\n\nThe proxy server is configured using environment variables:\n\n- `PORT`: The port on which the server will run (default: 11434)\n- `OPENAI_API_KEY`: Your OpenAI API key (required for OpenAI models)\n- `GEMINI_API_KEY`: Your Google Gemini API key (required for Gemini models)\n- `OPENROUTER_API_KEY`: Your OpenRouter API key (required for OpenRouter models)\n- `OPENROUTER_API_URL`: Your OpenRouter API URL (optional for OpenRouter models)\n- `NODE_ENV`: Set to `production` for production use or `development` for development\n\nYou can set these variables in a `.env` file in the project root.\n\n## Usage with JetBrains AI Assistant\n\n1. Start the Ollama Proxy server\n2. Configure JetBrains AI Assistant to use Ollama\n3. Set the Ollama server URL to `http://localhost:11434`\n4. Select one of the available models (e.g., `gpt-4o`, `gemini-2.5-flash`, `deepseek-r1`)\n\n## Development\n\n```bash\n# Run in development mode with hot reloading (requires Bun)\nbun run dev\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrip%2Follama-api-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxrip%2Follama-api-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrip%2Follama-api-proxy/lists"}