@@ -42,6 +42,7 @@ import { Command } from "../command"
4242import { $ , fileURLToPath } from "bun"
4343import { ConfigMarkdown } from "../config/markdown"
4444import { SessionSummary } from "./summary"
45+ import { Config } from "../config/config"
4546import { NamedError } from "@opencode-ai/util/error"
4647import { fn } from "@/util/fn"
4748import { SessionProcessor } from "./processor"
@@ -433,6 +434,7 @@ export namespace SessionPrompt {
433434 }
434435
435436 // normal processing
437+ const cfg = await Config . get ( )
436438 const agent = await Agent . get ( lastUser . agent )
437439 msgs = insertReminders ( {
438440 messages : msgs ,
@@ -613,6 +615,7 @@ export namespace SessionPrompt {
613615 } ,
614616 ] ,
615617 } ) ,
618+ experimental_telemetry : { isEnabled : cfg . experimental ?. openTelemetry } ,
616619 } )
617620 if ( result === "stop" ) break
618621 continue
@@ -1418,6 +1421,7 @@ export namespace SessionPrompt {
14181421 input . history . filter ( ( m ) => m . info . role === "user" && ! m . parts . every ( ( p ) => "synthetic" in p && p . synthetic ) )
14191422 . length === 1
14201423 if ( ! isFirst ) return
1424+ const cfg = await Config . get ( )
14211425 const small =
14221426 ( await Provider . getSmallModel ( input . providerID ) ) ?? ( await Provider . getModel ( input . providerID , input . modelID ) )
14231427 const language = await Provider . getLanguage ( small )
@@ -1464,6 +1468,7 @@ export namespace SessionPrompt {
14641468 ] ,
14651469 headers : small . headers ,
14661470 model : language ,
1471+ experimental_telemetry : { isEnabled : cfg . experimental ?. openTelemetry } ,
14671472 } )
14681473 . then ( ( result ) => {
14691474 if ( result . text )
0 commit comments