You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/09 11:53:51 UTC

[PR] fix(ai): stop the workspace failing http-engine turns [rocketmq-dashboard]

123123213weqw opened a new pull request, #5819:
URL: https://github.com/apache/rocketmq-dashboard/pull/5819

   ## Why
   
   `sendMessage` prepared the agent workspace at admission for every engine alike, and the prepare call has two visible side effects: it throws for a configuration the operator should hear about now (an unusable `workspace-dir`, an instance with no resolvable credential), and an empty result persists the degraded/unbound tools notice as the run's first event.
   
   The `http` engine has no agent CLI - `streamHttp` goes straight to the OpenAI-compatible client and `options()`, the only consumer of the preparation, is never built for it. So a plain completion turn could be killed by a RocketMQ-tools configuration it never touches, and an unbound conversation accumulated a "RocketMQ tools unavailable" warning on every chat turn - noise about tools this engine architecturally does not have (`streamHttp`'s own doc: no reasoning, no tools, no resumable session).
   
   ## What changed
   
   `sendMessage` skips `workspace.prepare` - and the degraded notice - when `AiRunExecutor.isHttpEngine(engine)` says the turn is a completion. The agent engines (`claude-code`, `qoder`) keep both behaviours unchanged.
   
   ## Validation
   
   Red test first: `anHttpTurnShouldNotPrepareAnAgentWorkspaceItCannotUseTest` fails on `upstream-studio` - a working http turn dies on the workspace exception before generating anything - and passes with the fix, which also asserts no `notice` row lands in a completion turn's timeline. Full `AiRunServiceTest` (24 tests) green.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(ai): stop the workspace failing http-engine turns [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #5819:
URL: https://github.com/apache/rocketmq-dashboard/pull/5819#issuecomment-6120379652

   Thanks — this is merged, as part of [`085e1fedf`](https://github.com/apache/rocketmq-dashboard/commit/085e1fedfcf60ccbf285bf12e7143c307d0b228c) on `rocketmq-studio`.
   
   Your change went in together with #5818 — all yours, all in the same area — so we folded them into a single commit instead of landing several near-identical entries for the same subsystem. Nothing was dropped.
   
   The commit message calls this one out explicitly:
   
   > #5819 `AiRunService.java:209` prepared an agent workspace for every engine, so a pure `http` completion turn — the engine `LlmConfigService.java:346-352` also falls back to for any unknown value — was failed with a 500 by a `RuntimeException` out of `prepare()` (`:210-220`) or collected a "RocketMQ tools unavailable" notice on every turn → `workspace.prepare(...)` is skipped when `AiRunExecutor.isHttpEngine(engine)` (a package-private static at `AiRunExecutor.java:630-633`, reachable from `AiRunService` in the same package, and already null/blank-safe), the notice condition becomes `preparation == null && !httpEngine`, and the `null` preparation handed to `RunContext` at `:228` is never read on that path because `AiRunExecutor.java:361-364` branches to `streamHttp` before anything touches `options()`; `engine` is already in scope from `:181`.
   
   Closing as folded, not rejected.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(ai): stop the workspace failing http-engine turns [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #5819: fix(ai): stop the workspace failing http-engine turns
URL: https://github.com/apache/rocketmq-dashboard/pull/5819


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org