No description
Find a file
2025-12-08 20:09:12 +09:00
.gitignore enhancement 2025-12-08 17:21:34 +09:00
package-lock.json Update project files and documentation 2025-12-08 18:16:36 +09:00
package.json Update project files and documentation 2025-12-08 18:16:36 +09:00
proxy.js OpenAI protocol support 2025-12-08 20:09:12 +09:00
proxy.test.js OpenAI protocol support 2025-12-08 19:18:49 +09:00
Readme.md enhancement 2025-12-06 23:59:45 +09:00

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

  1. Node.js (v18 or higher recommended).
  2. A GitLab.com account with access to Duo features.
  3. 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

  1. Log in to GitLab.com.
  2. Open your browser's Developer Tools (F12) -> Network tab.
  3. Refresh the page.
  4. Click on the first request (e.g., gitlab.com).
  5. 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).

2. Set Environment Variables

Export the following variables in your terminal before running the app: