No description
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| proxy.js | ||
| proxy.test.js | ||
| Readme.md | ||
GitLab Duo <-> Ollama Bridge
This project acts as a proxy server that allows local AI clients (like IntelliJ IDEA with the Ollama plugin) to communicate with GitLab Duo.
It mocks the Ollama API (/api/tags, /api/chat) and translates requests into GitLab GraphQL mutations and ActionCable WebSocket subscriptions.
🚀 Prerequisites
- Node.js (v18 or higher recommended).
- A GitLab.com account with access to Duo features.
- A valid GitLab Personal Access Token (PAT) or an active session.
⚙️ Configuration
Because GitLab Duo relies on WebSocket subscriptions that are normally handled by the browser, you must export your active session credentials as environment variables.
1. Get your Session Data
- Log in to GitLab.com.
- Open your browser's Developer Tools (F12) -> Network tab.
- Refresh the page.
- Click on the first request (e.g.,
gitlab.com). - Look at the Request Headers:
- Copy the entire value of
Cookie. - Look for
x-csrf-token(sometimes found in the HTML source or subsequent XHR requests).
- Copy the entire value of
2. Set Environment Variables
Export the following variables in your terminal before running the app: