mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-05-22 11:27:45 +00:00
- Add tool-detector.ts (6 CLI tools: claude, codex, opencode, cline, kilocode, continue) - Add config-generator/ factory + 6 generators (JSON + YAML) - Add doctor/checks.ts for CLI tool health checks - Add log-streamer.ts for usage log streaming - Add @omniroute/opencode-provider npm package - Add 5 CLI commands: config, status, logs, update, provider - Add 3 API routes: config, detect, apply - Update bin/omniroute.mjs, bin/cli/index.mjs, package.json - Update docs: SETUP_GUIDE.md, CLI-TOOLS.md - All tests pass (4302/4326, 24 pre-existing failures unchanged) |
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| index.js | ||
| index.ts | ||
| package.json | ||
| README.md | ||
@omniroute/opencode-provider
Provider plugin for connecting OpenCode to OmniRoute.
Installation
npm install @omniroute/opencode-provider
Usage
import { createOmniRouteProvider } from "@omniroute/opencode-provider";
const provider = createOmniRouteProvider({
baseURL: "http://localhost:20128/v1",
apiKey: "your-omniroute-api-key",
});
Then configure OpenCode to use the provider:
// OpenCode settings
{
"provider": provider
}
API
createOmniRouteProvider(options)
Creates an OpenCode-compatible provider object that routes requests through OmniRoute.
Options:
| Option | Type | Required | Description |
|---|---|---|---|
baseURL |
string |
Yes | OmniRoute API base URL (e.g., http://localhost:20128/v1) |
apiKey |
string |
Yes | OmniRoute API key |
model |
string |
No | Model identifier (default: "opencode") |
Returns: An OpenCode-compatible provider object with id, name, npm, options, and auth fields.