Browser tab content: # miikkaylisiurunen/raycast-ai-openrouter-proxy: Integrate any OpenAI-compatible API with Raycast AI

<body><p><strong><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy">raycast-ai-openrouter-proxy</a></strong> <span>Public</span></p> <p> Integrate any OpenAI-compatible API with Raycast AI
</p> <turbo-frame><div><a href="https://github.dev/">Open in github.dev</a> <a href="https://github.dev/">Open in a new github.dev tab</a> <a href="/codespaces/new/miikkaylisiurunen/raycast-ai-openrouter-proxy?resume=1">Open in codespace</a> <react-partial><p><a type="button" href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/branches"><span><span><span><strong>1</strong> Branch</span></span></span></a> <a type="button" href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/tags"><span><span><span><strong>0</strong> Tags</span></span></span></a></p> <article><p dir="auto">This project provides a proxy server that allows Raycast AI to utilize models from any OpenAI-compatible API (OpenAI, Gemini, OpenRouter, etc.). This brings "Bring Your Own Key" (BYOK) functionality to Raycast AI, meaning you can use your own API key and models from your chosen provider. By default, the proxy is configured to use OpenRouter.</p><p dir="auto"><strong>No Raycast Pro subscription required!</strong> 🎉</p> <p dir="auto">This proxy allows using custom models inside Raycast, including <strong>AI Chat</strong>, <strong>AI Commands</strong>, <strong>Quick AI</strong>, and <strong>AI Presets</strong>, giving you Raycast's native AI experience with the flexibility of custom models and your own API key.</p><p dir="auto"><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/blob/main/assets/ai-chat.jpg"><img src="/miikkaylisiurunen/raycast-ai-openrouter-proxy/raw/main/assets/ai-chat.jpg" alt="AI Chat"></a></p> <h2 dir="auto">Features</h2> <p dir="auto">This proxy aims to provide a seamless experience for using custom models within Raycast. Here's what is supported and what is not:</p><h3 dir="auto">Supported:</h3><ul dir="auto"><li>🧠 <strong>Any model</strong>: Access the wide range of models offered by OpenAI-compatible providers. OpenRouter is used by default.</li><li>👀 <strong>Vision support</strong>: Use models capable of processing images.</li><li>🛠️ <strong>AI Extensions &amp; MCP</strong>: Use your favorite AI Extensions and MCP servers. Note that Ollama tool calling support is experimental in Raycast.</li><li>📝 <strong>System instructions</strong>: Provide system-level prompts to guide model behavior.</li><li>📎 <strong>Attachments</strong>: Attach all the same things as with the official models.</li><li>🔨 <strong>Parallel tool use</strong>: Make multiple tool calls simultaneously.</li><li>⚡ <strong>Streaming</strong>: Get real-time responses from models.</li><li>🔤 <strong>Chat title generation</strong>: Automatically generate chat titles.</li><li>🛑 <strong>Stream cancellation</strong>: Stop ongoing responses from models.</li></ul><h3 dir="auto">Not Supported:</h3><ul dir="auto"><li>💭 <strong>Displaying thinking process</strong>: Models do not display their thinking process, but thinking models are supported.</li><li>🌐 <strong>Remote tools</strong>: Some AI Extensions are classified as "remote tools" and are not supported. These include <code>@web</code> and <code>@gpt_image</code>, among others. You can replace these with MCP servers if you would like similar tools.</li></ul><h2 dir="auto">Requirements</h2> <ul dir="auto"><li>Docker</li> <li>API key for your chosen provider (e.g., OpenRouter)</li></ul> <h2 dir="auto">Getting Started</h2> <p dir="auto">To get started, follow these steps:</p><ol dir="auto"><li><p dir="auto">Clone the repository:</p><pre><code>git clone https://github.com/miikkaylisiurunen/raycast-ai-openrouter-proxy.git</code></pre></li> <li><p dir="auto">Change into the project directory:</p><pre><code>cd raycast-ai-openrouter-proxy</code></pre></li> <li><p dir="auto">Configure your provider in the Docker Compose file. Open the <code>docker-compose.yml</code> file and replace <code>YOUR_API_KEY</code> with your API key. By default, the proxy uses OpenRouter. To use a different OpenAI-compatible provider, change the <code>BASE_URL</code> to your provider's API endpoint.</p></li><li><p dir="auto">Update the models configuration file. An example <code>models.json</code> file is included in the project root for configuring models. Refer to the <a href="#configuration">Configuration</a> section for details on its structure.</p></li><li><p dir="auto">Start the proxy server:</p><pre><code>docker compose up -d</code></pre> <p dir="auto">This will start the proxy server in the background. By default, it will run on port <code>11435</code>. If that port is already in use, you can change it in the <code>docker-compose.yml</code> file.</p></li><li><p dir="auto">Set the Ollama host in Raycast settings: Open Raycast Settings, go to AI &gt; Ollama Host and set the host to <code>localhost:11435</code>. If you changed the port in the <code>docker-compose.yml</code> file, make sure to update it here as well. You can also enable experimental AI Extension and MCP support in the Raycast settings. See the <a href="#configuration">Configuration</a> section for more details.</p><p dir="auto"><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/blob/main/assets/raycast-settings.jpg"><img src="/miikkaylisiurunen/raycast-ai-openrouter-proxy/raw/main/assets/raycast-settings.jpg" alt="Raycast settings"></a></p></li></ol><h2 dir="auto">Configuration</h2> <p dir="auto">The proxy's behavior is primarily configured through a <code>models.json</code> file in the root directory of the project. This file defines the models available to Raycast and their specific settings. An example <code>models.json</code> file is included in this repository. Each entry in the JSON array represents a model and can include the following properties:</p><ul dir="auto"><li><code>name</code>: The name of the model as it will appear in Raycast.</li><li><code>id</code>: The model ID in the format expected by your provider.</li><li><code>contextLength</code>: The maximum context length (in tokens) the model supports. Only affects Raycast's UI and not the model itself.</li><li><code>capabilities</code>: An array of strings indicating the model's capabilities.<ul dir="auto"><li><code>"vision"</code>: The model can process images.</li><li><code>"tools"</code>: The model supports AI Extensions and MCP (tool calling). You need to enable the experimental AI Extensions support in Raycast settings for this to work.</li></ul></li><li><code>temperature</code>: (Optional) Controls the creativity of the model. A value between 0 and 2.</li><li><code>topP</code>: (Optional) Another parameter to control the randomness of the output, a value between 0 and 1.</li><li><code>max_tokens</code>: (Optional) The maximum number of tokens the model is allowed to generate in a single response.</li><li><code>extra</code>: (Optional) An object for advanced, provider-specific configurations. These options are passed directly to the provider's API. For example, you can use it for OpenRouter-specific settings like specifying a preferred provider (<code>"provider": { "only": ["openai"] }</code>) or setting the reasoning effort for supported models (<code>"reasoning": { "effort": "high" }</code>). Refer to your provider's documentation for available parameters. Note that <code>extra</code> properties are not validated at startup. If you encounter issues, check the container logs after sending a request for any errors related to these settings.</li></ul><p dir="auto">When you modify the <code>models.json</code> file, you need to restart the proxy server for the changes to take effect. You can do this by running:</p><pre><code>docker compose restart</code></pre> <p dir="auto">Example <code>models.json</code> structure for OpenRouter:</p><pre><code>[
  {
    "name": "Gemini 2.5 Flash",
    "id": "google/gemini-2.5-flash-preview-05-20",
    "contextLength": 1000000,
    "capabilities": ["vision", "tools"],
    "temperature": 0
  },
  {
    "name": "Gemini 2.5 Flash Thinking",
    "id": "google/gemini-2.5-flash-preview-05-20:thinking",
    "contextLength": 1000000,
    "capabilities": ["vision", "tools"],
    "temperature": 1
  },
  {
    "name": "GPT-4o Mini",
    "id": "openai/gpt-4o-mini",
    "contextLength": 128000,
    "capabilities": ["vision", "tools"]
  },
  {
    "name": "Claude Sonnet 4 (Thinking)",
    "id": "anthropic/claude-sonnet-4",
    "contextLength": 200000,
    "capabilities": ["vision", "tools"],
    "extra": {
      "reasoning": {
        "max_tokens": 4000
      }
    }
  }
]</code></pre> <h2 dir="auto">FAQ</h2> <p dir="auto">Refer to the <a href="#features">Features</a> section for a list of supported and unsupported functionalities.</p><p dir="auto">No, one of the main benefits of this proxy is to enable the use of custom models within Raycast without needing a Raycast Pro subscription.</p><p dir="auto">Yes, but it is generally not recommended. There is currently no authentication implemented, meaning anyone with access to your server's address could potentially make requests using your API key. You would need to implement your own authentication mechanism if you want to secure it for remote access.</p><p dir="auto">No, you do not need to install Ollama.</p><p dir="auto">See the <a href="#getting-started">Getting Started</a> section.</p><p dir="auto">This proxy acts as an Ollama server, allowing Raycast to communicate with it. It translates requests from Raycast into a format that the target OpenAI-compatible API understands.</p><p dir="auto">If you modify the <code>models.json</code> file, you need to restart the proxy server for the changes to take effect. You can do this by running:</p><pre><code>docker compose restart</code></pre> <p dir="auto">If you encounter issues, a good first step is to check the container logs. You can do this by running the command:</p><pre><code>docker compose logs</code></pre></article></react-partial> <h2>About</h2> <p> Integrate any OpenAI-compatible API with Raycast AI
</p> <p><a href="#readme-ov-file"> Readme</a></p> <p><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/activity"><span>Activity</span></a></p> <p><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/stargazers"><strong>100</strong> stars</a></p> <p><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/watchers"><strong>0</strong> watching</a></p> <p><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/forks"><strong>5</strong> forks</a></p> <p><a href="/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fmiikkaylisiurunen%2Fraycast-ai-openrouter-proxy&amp;report=miikkaylisiurunen+%28user%29"> Report repository</a></p> <h2>Releases</h2> <p>No releases published</p> <h2>Packages</h2> <p> No packages published <br></p> <div><h2>Languages</h2> <ul><li><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/search?l=typescript"><span>TypeScript</span> <span>95.2%</span></a></li> <li><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/search?l=javascript"><span>JavaScript</span> <span>3.4%</span></a></li> <li><a href="/miikkaylisiurunen/raycast-ai-openrouter-proxy/search?l=dockerfile"><span>Dockerfile</span> <span>1.4%</span></a></li></ul></div></div></turbo-frame></body>

get started的3和4步在Mac上怎么完成