Providers

Open a session once per provider, then use the local OpenAI-compatible endpoint.

Chat

Send multi-turn messages through any enabled provider.

Add Provider

Create a DOM-mode provider config in data/providers.

Settings

Runtime values read from environment and local defaults.

API Usage

Use Web LLM API Bridge with OpenAI-compatible clients.

Endpoint

POST http://AGDEV_IP:9920/v1/chat/completions

Provider Selection

Set the model field to one of: chatgpt, claude, gemini, deepseek.

Each provider must be logged in via the dashboard first.

Example: curl

curl -X POST http://AGDEV_IP:9920/v1/chat/completions -H "Content-Type: application/json" -d '{model:chatgpt,messages:[{role:user,content:Hello}],stream:false}'

Example: streaming

curl -X POST http://AGDEV_IP:9920/v1/chat/completions -H "Content-Type: application/json" -d '{model:chatgpt,messages:[{role:user,content:Hello}],stream:true}'

OpenAI-compatible

This API uses the same format as OpenAI. Use it with any tool that supports OpenAI API by setting the base URL to http://AGDEV_IP:9920/v1.

Models endpoint

GET http://AGDEV_IP:9920/v1/models returns list of connected providers.

Adding a Custom Provider

To add a new provider, you need three CSS selectors:

  1. Input selector - targets the chat input field
  2. Send button selector - targets the send button
  3. Response selector - targets the assistant response text

How to find selectors using Chrome DevTools

  1. Open the provider website in Chrome
  2. Right-click the chat input field → Inspect
  3. Look for a unique attribute like placeholder, id, or class
  4. Right-click the send button → Inspect
  5. Look for aria-label, type="submit", or a unique class
  6. Right-click a response message → Inspect
  7. Look for a container that wraps the response text

Example selectors

Element Example Selector
Input textarea[placeholder="Type a message..."]
Input div[contenteditable="true"]:not(.ql-clipboard)
Send button[type="submit"]
Send button[aria-label*="Send"]
Response .message-content .text
Response .prose p

Tips

  • Use unique attributes (placeholder, aria-label, data-testid) for better reliability
  • Avoid classes with random suffixes (they change on each deploy)
  • Test your selector in the browser console: document.querySelector("your-selector")
Settings saved