GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gpt-5 lower verbosity · daonb/opencode@53630eb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • bun.lock
  • package.json
  • packages/opencode/src
    • global
      • index.ts
    • provider
      • provider.ts
      • transform.ts
    • session
      • index.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bun.lock‎

Copy file name to clipboardExpand all lines: bun.lock
+27-288Lines changed: 27 additions & 288 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"@hono/zod-validator": "0.4.2",
2121
"@types/node": "22.13.9",
2222
"@tsconfig/node22": "22.0.2",
23-
"ai": "5.0.0-beta.34",
23+
"ai": "5.0.8",
2424
"hono": "4.7.10",
2525
"typescript": "5.8.2",
26-
"zod": "3.25.49",
26+
"zod": "3.25.76",
2727
"remeda": "2.26.0"
2828
}
2929
},
Collapse file

‎packages/opencode/src/global/index.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/global/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ await Promise.all([
2727
fs.mkdir(Global.Path.log, { recursive: true }),
2828
])
2929

30-
const CACHE_VERSION = "4"
30+
const CACHE_VERSION = "5"
3131

3232
const version = await Bun.file(path.join(Global.Path.cache, "version"))
3333
.text()
Collapse file

‎packages/opencode/src/provider/provider.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/provider/provider.ts
+15-15Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export namespace Provider {
9797
Array.isArray(msg.content) && msg.content.some((part: any) => part.type === "image_url"),
9898
)
9999
}
100-
} catch { }
100+
} catch {}
101101
const headers: Record<string, string> = {
102102
...init.headers,
103103
...copilot.HEADERS,
@@ -283,26 +283,26 @@ export namespace Provider {
283283
cost:
284284
!model.cost && !existing?.cost
285285
? {
286-
input: 0,
287-
output: 0,
288-
cache_read: 0,
289-
cache_write: 0,
290-
}
286+
input: 0,
287+
output: 0,
288+
cache_read: 0,
289+
cache_write: 0,
290+
}
291291
: {
292-
cache_read: 0,
293-
cache_write: 0,
294-
...existing?.cost,
295-
...model.cost,
296-
},
292+
cache_read: 0,
293+
cache_write: 0,
294+
...existing?.cost,
295+
...model.cost,
296+
},
297297
options: {
298298
...existing?.options,
299299
...model.options,
300300
},
301301
limit: model.limit ??
302302
existing?.limit ?? {
303-
context: 0,
304-
output: 0,
305-
},
303+
context: 0,
304+
output: 0,
305+
},
306306
}
307307
parsed.models[modelID] = parsedModel
308308
}
@@ -373,7 +373,7 @@ export namespace Provider {
373373
const existing = s.sdk.get(provider.id)
374374
if (existing) return existing
375375
const pkg = provider.npm ?? provider.id
376-
const mod = await import(await BunProc.install(pkg, "beta"))
376+
const mod = await import(await BunProc.install(pkg, "latest"))
377377
const fn = mod[Object.keys(mod).find((key) => key.startsWith("create"))!]
378378
const loaded = fn({
379379
name: provider.id,
Collapse file

‎packages/opencode/src/provider/transform.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/provider/transform.ts
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,13 @@ export namespace ProviderTransform {
8181
if (modelID.toLowerCase().includes("qwen")) return 1
8282
return undefined
8383
}
84+
85+
export function options(_providerID: string, modelID: string) {
86+
if (modelID.includes("gpt-5")) {
87+
return {
88+
reasoningEffort: "low",
89+
textVerbosity: "low",
90+
}
91+
}
92+
}
8493
}
Collapse file

‎packages/opencode/src/session/index.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/session/index.ts
+14-9Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ export namespace Session {
322322
for (const child of await children(sessionID)) {
323323
await remove(child.id, false)
324324
}
325-
await unshare(sessionID).catch(() => { })
326-
await Storage.remove(`session/info/${sessionID}`).catch(() => { })
327-
await Storage.removeDir(`session/message/${sessionID}/`).catch(() => { })
325+
await unshare(sessionID).catch(() => {})
326+
await Storage.remove(`session/info/${sessionID}`).catch(() => {})
327+
await Storage.removeDir(`session/message/${sessionID}/`).catch(() => {})
328328
state().sessions.delete(sessionID)
329329
state().messages.delete(sessionID)
330330
if (emitEvent) {
@@ -523,7 +523,7 @@ export namespace Session {
523523
sessionID: input.sessionID,
524524
abort: new AbortController().signal,
525525
messageID: userMsg.id,
526-
metadata: async () => { },
526+
metadata: async () => {},
527527
}),
528528
)
529529
return [
@@ -632,7 +632,7 @@ export namespace Session {
632632

633633
// mark session as updated
634634
// used for session list sorting (indicates when session was most recently interacted with)
635-
await update(input.sessionID, (_draft) => { })
635+
await update(input.sessionID, (_draft) => {})
636636

637637
if (isLocked(input.sessionID)) {
638638
return new Promise((resolve) => {
@@ -679,7 +679,9 @@ export namespace Session {
679679
generateText({
680680
maxOutputTokens: small.info.reasoning ? 1024 : 20,
681681
providerOptions: {
682-
[input.providerID]: small.info.options,
682+
[input.providerID]: {
683+
...small.info.options,
684+
},
683685
},
684686
messages: [
685687
...SystemPrompt.title(input.providerID).map(
@@ -712,7 +714,7 @@ export namespace Session {
712714
draft.title = title.trim()
713715
})
714716
})
715-
.catch(() => { })
717+
.catch(() => {})
716718
}
717719

718720
const agent = await Agent.get(inputAgent)
@@ -927,11 +929,14 @@ export namespace Session {
927929
},
928930
maxRetries: 3,
929931
activeTools: Object.keys(tools).filter((x) => x !== "invalid"),
930-
maxOutputTokens: model.info.id.startsWith("gpt-5") ? undefined : outputLimit,
932+
maxOutputTokens: outputLimit,
931933
abortSignal: abort.signal,
932934
stopWhen: stepCountIs(1000),
933935
providerOptions: {
934-
[input.providerID]: model.info.options,
936+
[input.providerID]: {
937+
...ProviderTransform.options(input.providerID, input.modelID),
938+
...model.info.options,
939+
},
935940
},
936941
temperature: params.temperature,
937942
topP: params.topP,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.