vibe-gate-mcp 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.mjs +17 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.3] - 2026-09-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Support GPT model family (including `gpt-5.6-luna`) on OpenCode Go by routing requests to OpenCode Go Responses API (`/zen/go/v1/responses`).
|
|
13
|
+
|
|
14
|
+
### Tests
|
|
15
|
+
|
|
16
|
+
- Added endpoint routing test for GPT models on OpenCode Go.
|
|
17
|
+
- Added OpenCode provider integration test verifying Go Responses endpoint URL and payload.
|
|
18
|
+
|
|
8
19
|
## [0.1.2] - 2026-09-02
|
|
9
20
|
|
|
10
21
|
### Fixed
|
package/dist/index.mjs
CHANGED
|
@@ -155,6 +155,9 @@ const OPENCODE_ENDPOINT_ROUTING = [
|
|
|
155
155
|
];
|
|
156
156
|
/** Routing table: model prefix → Go API family — @see https://opencode.ai/docs/go/ */
|
|
157
157
|
const OPENCODE_GO_ENDPOINT_ROUTING = [{
|
|
158
|
+
kind: OPENCODE_ENDPOINT_KINDS.RESPONSES,
|
|
159
|
+
prefixes: [OPENCODE_MODEL_FAMILIES.GPT]
|
|
160
|
+
}, {
|
|
158
161
|
kind: OPENCODE_ENDPOINT_KINDS.ANTHROPIC,
|
|
159
162
|
prefixes: [OPENCODE_MODEL_FAMILIES.MINIMAX, OPENCODE_MODEL_FAMILIES.QWEN]
|
|
160
163
|
}];
|
|
@@ -178,9 +181,15 @@ const OPENCODE_FETCH_TIMEOUT_MS = 3e4;
|
|
|
178
181
|
const OPENCODE_GO = {
|
|
179
182
|
BASE_URL: "https://opencode.ai/zen/go/v1",
|
|
180
183
|
ANTHROPIC_BASE_URL: "https://opencode.ai/zen/go",
|
|
181
|
-
PATHS: {
|
|
184
|
+
PATHS: {
|
|
185
|
+
RESPONSES: "responses",
|
|
186
|
+
MODELS: "models"
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const OPENCODE_GO_URLS = {
|
|
190
|
+
RESPONSES: `${OPENCODE_GO.BASE_URL}/${OPENCODE_GO.PATHS.RESPONSES}`,
|
|
191
|
+
MODELS_LIST: `${OPENCODE_GO.BASE_URL}/${OPENCODE_GO.PATHS.MODELS}`
|
|
182
192
|
};
|
|
183
|
-
`${OPENCODE_GO.BASE_URL}${OPENCODE_GO.PATHS.MODELS}`;
|
|
184
193
|
/** Persona identifiers */
|
|
185
194
|
const PERSONAS = {
|
|
186
195
|
SECURITY_FIRST: "security-first",
|
|
@@ -2298,8 +2307,9 @@ async function completeViaChat(apiKey, model, messages, plan) {
|
|
|
2298
2307
|
} : void 0
|
|
2299
2308
|
};
|
|
2300
2309
|
}
|
|
2301
|
-
async function completeViaResponses(apiKey, model, messages) {
|
|
2302
|
-
const
|
|
2310
|
+
async function completeViaResponses(apiKey, model, messages, plan = OPENCODE_PLANS.ZEN) {
|
|
2311
|
+
const url = plan === OPENCODE_PLANS.GO ? OPENCODE_GO_URLS.RESPONSES : OPENCODE_ZEN_URLS.RESPONSES;
|
|
2312
|
+
const response = await fetch(url, {
|
|
2303
2313
|
method: "POST",
|
|
2304
2314
|
headers: {
|
|
2305
2315
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -2314,7 +2324,8 @@ async function completeViaResponses(apiKey, model, messages) {
|
|
|
2314
2324
|
});
|
|
2315
2325
|
if (!response.ok) {
|
|
2316
2326
|
const errorBody = await response.text();
|
|
2317
|
-
|
|
2327
|
+
const planLabel = plan === OPENCODE_PLANS.GO ? "Go" : "Zen";
|
|
2328
|
+
throw new Error(`OpenCode ${planLabel} responses API failed (${response.status}): ${errorBody}`);
|
|
2318
2329
|
}
|
|
2319
2330
|
const body = await response.json();
|
|
2320
2331
|
return {
|
|
@@ -2355,7 +2366,7 @@ function createOpenCodeProvider(apiKey, model, plan = OPENCODE_PLANS.ZEN) {
|
|
|
2355
2366
|
return { async complete(messages) {
|
|
2356
2367
|
const endpoint = resolveOpenCodeEndpoint(model, plan);
|
|
2357
2368
|
if (endpoint === OPENCODE_ENDPOINT_KINDS.ANTHROPIC) return completeViaAnthropic(apiKey, model, messages, plan);
|
|
2358
|
-
if (endpoint === OPENCODE_ENDPOINT_KINDS.RESPONSES) return completeViaResponses(apiKey, model, messages);
|
|
2369
|
+
if (endpoint === OPENCODE_ENDPOINT_KINDS.RESPONSES) return completeViaResponses(apiKey, model, messages, plan);
|
|
2359
2370
|
if (endpoint === OPENCODE_ENDPOINT_KINDS.GEMINI) return completeViaGemini(apiKey, model, messages, plan);
|
|
2360
2371
|
return completeViaChat(apiKey, model, messages, plan);
|
|
2361
2372
|
} };
|