Open History to see the last commit
1import type { ProbeRecord } from './types.ts'
2
3/**
4 * OpenCode Go Gemini routes probed 2026-10-23 (issue #461).
5 *
6 * go.mdx lists only the base
7 * `…/models/gemini-4-argon-contributor`, with no method. These two calls
8 * returned 200 with a Gemini-shaped body (`candidates`, `usageMetadata`;
9 * the non-stream body also had `thoughtSignature`). That is enough to bind
10 * the route. It is not a published statement that Google's request schema
11 * is this API, so the synced operations stay route-only.
12 *
13 * Before the workspace allowed training, `:generateContent` returned 400
14 * "This Go model trains on request data…". That statement is
15 * `trainsOnRequestData` on this model only.
16 *
17 * `authorization` is the env name, never a key.
18 */
19const HEADERS = {
20 authorization: 'Bearer $OPENCODE_GO_API_KEY',
21 'content-type': 'application/json',
22 'user-agent': 'modelschemas-probe/1',
23 'x-opencode-session': 'modelschemas-probe',
24}
25
26const BODY = {
27 contents: [{ role: 'user', parts: [{ text: 'hi' }] }],
28 generationConfig: { maxOutputTokens: 8 },
29}
30
31const MODEL = 'gemini-4-argon-contributor'
32const BASE = `inference/go/google/v1beta/models/${MODEL}`
33
34export const OPENCODE_GO_PROBE_SOURCE =
35 'src/server/providers/probes/opencode-go.ts'
36
37export const records: Array<ProbeRecord> = [
38 {
39 id: 'gemini-4-argon-contributor-generate',
40 provider: 'opencode-go',
41 model: MODEL,
42 fact: 'schemaEndpointId',
43 route: `${BASE}:generateContent`,
44 verifiedAt: '2026-10-23',
45 ranBy: 'tombeckenham',
46 request: {
47 method: 'POST',
48 path: `/${BASE}:generateContent`,
49 headers: HEADERS,
50 body: BODY,
51 },
52 expect: {
53 status: 200,
54 jsonKeys: ['candidates', 'usageMetadata'],
55 },
56 trainsOnRequestData: true,
57 },
58 {
59 id: 'gemini-4-argon-contributor-stream',
60 provider: 'opencode-go',
61 model: MODEL,
62 fact: 'schemaEndpointId',
63 route: `${BASE}:streamGenerateContent`,
64 verifiedAt: '2026-10-23',
65 ranBy: 'tombeckenham',
66 request: {
67 method: 'POST',
68 path: `/${BASE}:streamGenerateContent?alt=sse`,
69 headers: HEADERS,
70 body: BODY,
71 },
72 expect: {
73 status: 200,
74 jsonKeys: ['candidates'],
75 sse: true,
76 },
77 },
78]