OpenRouterXcodeProxy
OpenRouter API Proxy to allow usage as model provider in Xcode 26 beta
Install / Use
/learn @Kirow/OpenRouterXcodeProxyREADME
OpenRouter Proxy for Xcode 26 Beta
This project creates a proxy for OpenRouter that modifies API responses to work with Xcode 26 beta as a model provider. The proxy transforms OpenRouter responses to match OpenAI's format, which is required by Xcode's native AI integration.
Features
/modelsendpoint returns models in OpenAI format/chat/completionsendpoint proxies requests directly to OpenRouter- Containerized with Docker
- Standalone pre-compiled executable
Setup
Docker Deployment
Option 1: Docker Compose (Recommended)
- Create docker-compose.yml (already created in project)
- Start the service:
docker-compose up
To use a different host port (e.g., 9090):
HOST_PORT=9090 docker-compose up
Option 2: Manual Docker Commands
- Build the Docker image:
docker build -t openrouter-proxy ./proxy
- Run the container:
docker run --rm -p ${HOST_PORT:-8080}:8080 openrouter-proxy
Standalone Executable Deployment
- Make the build script executable:
chmod +x build_executable.sh
- Build the standalone executable:
./build_executable.sh
- Run the executable (default port 8080):
./proxy/dist/app
To run on a different port (e.g., 9090):
PORT=9090 ./proxy/dist/app
Environment Variables
DISABLE_SSL_VERIFY: Set to 'true' to disable SSL verification (useful for debugging with proxies like Charles). Default: SSL verification is enabled.MODEL_FILTER_FILE: Set to the absolute path of a text file containing allowed model IDs (one per line). If set, the/v1/modelsendpoint will only return models whose IDs are in this file.
Xcode Setup
-
Setting > Intelligence > Add a Model Provider...
- URL: http://localhost:8080
- API Key: Bearer sk-...
- API Key Header: Authorization
- Description: OpenRouter
Using with Proxyman (Debugging Proxy)
When using a debugging proxy like Proxyman, you might encounter SSL certificate verification errors. To resolve this:
- Set the
DISABLE_SSL_VERIFYenvironment variable totrue:
# For Docker Compose
DISABLE_SSL_VERIFY=true docker-compose up
# For standalone executable
DISABLE_SSL_VERIFY=true ./proxy/dist/app
- Trust Proxyman's root certificate in your system keychain (macOS):
- Open Proxyman
- Go to Certificate → Install Certificate on This Mac...
- Follow prompts to add to System keychain
- Open Keychain Access, find "Proxyman" certificate
- Double-click it, expand Trust, and set "When using this certificate" to "Always Trust"
Important Security Note: Disabling SSL verification should only be done for debugging purposes. Never use this in production environments as it makes connections vulnerable to man-in-the-middle attacks.
Usage
- Get models in OpenAI format:
GET http://localhost:8080/models(include your OpenRouter API key in the Authorization header) - Use chat completions:
POST http://localhost:8080/chat/completionswith your request payload and Authorization header
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
