Skip to content

Commit 69a265b

Browse files
rustybretclaude
andcommitted
local: plugin init, reasoning_content stripping, debug logging, pvrdrxtd submodule
- Strip reasoning_content/reasoning_details from messages for providers that don't support interleaved reasoning (e.g. Cerebras) - Add plugin.init() calls in Agent.state and Command layer so plugins load before skills/commands are built - Add LLM param debug logging for model introspection - Add pvrdrxtd submodule and .gitignore entries for local paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f7ca55f commit 69a265b

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

  • packages/opencode/src/session

packages/opencode/src/session/llm.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,39 @@ const live: Layer.Layer<
212212
})
213213
: undefined
214214

215-
// Runtime seam: native is an opt-in adapter over @opencode-ai/llm. It
216-
// either returns a ready LLMEvent stream or a concrete fallback reason.
215+
l.info("params", {
216+
temperature: params.temperature,
217+
topP: params.topP,
218+
topK: params.topK,
219+
maxOutputTokens: params.maxOutputTokens,
220+
variant: input.user.model.variant,
221+
providerOptions: ProviderTransform.providerOptions(input.model, params.options),
222+
limit: input.model.limit,
223+
capabilities: input.model.capabilities,
224+
})
225+
226+
const opencodeProjectID = input.model.providerID.startsWith("opencode")
227+
? (yield* InstanceState.context).project.id
228+
: undefined
229+
230+
const requestHeaders = {
231+
...(input.model.providerID.startsWith("opencode")
232+
? {
233+
...(opencodeProjectID ? { "x-opencode-project": opencodeProjectID } : {}),
234+
"x-opencode-session": input.sessionID,
235+
"x-opencode-request": input.user.id,
236+
"x-opencode-client": flags.client,
237+
"User-Agent": `opencode/${InstallationVersion}`,
238+
}
239+
: {
240+
"x-session-affinity": input.sessionID,
241+
...(input.parentSessionID ? { "x-parent-session-id": input.parentSessionID } : {}),
242+
"User-Agent": `opencode/${InstallationVersion}`,
243+
}),
244+
...input.model.headers,
245+
...headers,
246+
}
247+
217248
if (flags.experimentalNativeLlm) {
218249
const native = LLMNativeRuntime.stream({
219250
model: input.model,

0 commit comments

Comments
 (0)