Repository navigation
Replies: 3 comments
|
Confirmed on macOS with DSH 0.2.1-rc.5 — still present in rc.5, same route ( Extra data point from probing the gateway directly (
So the reviewer call does not need the real session id to succeed — any stable value satisfies routing. That makes the one-line fix safe even if the session identity is not fully plumbed through. Workaround (no ASAR patching, survives app updates)A small user plugin on the export const name = "opencode-session-fallback";
export const inject = ["llm"];
export function apply(ctx) {
ctx.on("llm/stream", (options, next) =>
next(options.sessionId === undefined ? { ...options, sessionId: "dsh-unknown-session" } : options));
}Register it from the profile layer ( - insert:
- id: opencode-session-fallback
name: /absolute/path/to/index.mjsWith this in place the auto preset works again on opencode-go routes. Fix const options = deepFreeze({
provider: snapshot.provider,
model: snapshot.model,
+ sessionId: agent.session.id,
system: REVIEW_POLICY,Suggestion: when a provider declares that it needs a routing identity, an Also, this looks reported several times (#9972, #8764, #10643, #10381) — perhaps worth consolidating into one canonical thread so it can be tracked. |
|
Correction to the workaround in my comment above: the A working user-side version (wrap the |
|
Received, thank you
Nemo
***@***.***
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
With DSH 0.2.1-rc.2 and an
opencode-go/*model route, selecting theauto(Auto review) permission preset makes every tool call fail closed:The tool body is never executed. Non-auto presets are unaffected.
Environment
@deepseek-ai/dsh-experimental-auto-review(bundled),@deepseek-ai/dsh-permission-presetsopencode-go/deepseek-v4.1-flash(the default here)Reproduction
opencode-go/*model as the session route./permission auto(or pick 自动审查 / Auto review in the picker).Root cause
dsh-experimental-auto-review/lib/index.js→classifyRisk()builds the reviewer request with only the provider/model route:There is no
sessionId. The opencode-go provider only attaches its mandatory per-conversation header when that field exists:So the reviewer's
POST https://opencode.ai/zen/go/v1/chat/completionsgoes out without the header and the gateway answers400 MissingSessionID.Direct API evidence (same key, same endpoint)
400 {"type":"error","error":{"type":"MissingSessionID","message":"Request is missing x-opencode-session ..."}}x-opencode-session: <any uuid>→200chat.completionSo the credential and endpoint are fine; only the reviewer's request shape is wrong.
Suggested fixes (any one is enough)
sessionId) intoclassifyRisk'sctx.llm.streamoptions.Impact
The
autopreset is unusable on everyopencode-go/*route; users must either fall back to full access (no reviewer) or move to another provider. Happy to test a build.All reactions