fix(hermes): avoid Anthropic SSE for compatible endpoints#6295
fix(hermes): avoid Anthropic SSE for compatible endpoints#6295chengjiew wants to merge 3 commits into
Conversation
Signed-off-by: Chengjie Wang <chengjiew@nvidia.com>
📝 WalkthroughWalkthroughHermes routing now returns ChangesHermes routing fix
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the branch is 96%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the branch is 73%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
Signed-off-by: Chengjie Wang <chengjiew@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-6295.docs.buildwithfern.com/nemoclaw |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/lib/actions/inference-route-api.test.ts (1)
195-218: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueGood regression coverage; consider one more case.
Both the updated
anthropic-prodtest and the new#6289test correctly exercise the routing function directly and confirm the transition away from the previously-preferredanthropic-messages. One gap: the new test only coverscurrentProvider === provider(both"compatible-anthropic-endpoint"); since the override ininference-route-api.tsintentionally ignoressameProvider, a case wherecurrentProviderdiffers (e.g., switching intocompatible-anthropic-endpointfrom another provider) would confirm the override applies unconditionally, not just when staying on the same provider.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/inference-route-api.test.ts` around lines 195 - 218, Add one more regression test in inference-route-api.test.ts around resolve to cover switching into compatible-anthropic-endpoint from a different currentProvider, not just when currentProvider equals provider. Reuse the existing resolve/session setup and assert that the Hermes-compatible endpoint override still returns openai-completions even when the provider transition is from another provider, so the sameProvider-independent behavior in inference-route-api.ts is exercised.src/lib/actions/inference-route-api.ts (1)
112-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLGTM — correct fix, but add a comment explaining the override.
The unconditional early return matches the PR objective (avoid the broken Anthropic SSE double
message_starton managed compatible endpoints) and is well covered by the new tests. Since this silently overrides any persisted session/config preference (including a user-setanthropic-messages), a short comment referencing the underlying issue would help future maintainers avoid accidentally "fixing" this back to config-driven resolution.📝 Suggested comment
if (provider === "anthropic-prod") return "anthropic-messages"; + // Hermes on compatible-anthropic-endpoint must stay on the managed + // OpenAI-compatible route: the Anthropic SSE path emits a duplicate + // message_start, breaking Hermes' "no final response" detection (`#6289`). if (agentName === "hermes" && provider === "compatible-anthropic-endpoint") { return "openai-completions"; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/inference-route-api.ts` around lines 112 - 114, Add a brief inline comment in the inference route resolution logic near the `agentName === "hermes" && provider === "compatible-anthropic-endpoint"` early return to explain that this override is intentional. Mention that `resolveInferenceRoute` (or the corresponding route-selection path in `inference-route-api.ts`) must force `openai-completions` for Hermes on compatible Anthropic endpoints to avoid the broken Anthropic SSE double `message_start`, even if a session or config prefers `anthropic-messages`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/actions/inference-route-api.test.ts`:
- Around line 195-218: Add one more regression test in
inference-route-api.test.ts around resolve to cover switching into
compatible-anthropic-endpoint from a different currentProvider, not just when
currentProvider equals provider. Reuse the existing resolve/session setup and
assert that the Hermes-compatible endpoint override still returns
openai-completions even when the provider transition is from another provider,
so the sameProvider-independent behavior in inference-route-api.ts is exercised.
In `@src/lib/actions/inference-route-api.ts`:
- Around line 112-114: Add a brief inline comment in the inference route
resolution logic near the `agentName === "hermes" && provider ===
"compatible-anthropic-endpoint"` early return to explain that this override is
intentional. Mention that `resolveInferenceRoute` (or the corresponding
route-selection path in `inference-route-api.ts`) must force
`openai-completions` for Hermes on compatible Anthropic endpoints to avoid the
broken Anthropic SSE double `message_start`, even if a session or config prefers
`anthropic-messages`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: fe095a1e-3953-4162-a371-e585807717a3
📒 Files selected for processing (3)
src/lib/actions/inference-route-api.test.tssrc/lib/actions/inference-route-api.tssrc/lib/actions/inference-set-hermes-run.test.ts
PR Review Advisor — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
|
v0.0.75 release-gate note: CI is green after refreshing this branch, but the current implementation still misses the fresh-onboarding path. Fresh Hermes custom-Anthropic onboarding validates Before approval, this needs one explicit contract implemented end to end: either (1) compatible-Anthropic for Hermes exposes the OpenAI surface and provider registration is updated safely across onboarding/resume/migration/inference-set, or (2) the stack keeps native Anthropic semantics and fixes/filters the duplicate SSE behavior at the appropriate upstream boundary. The existing green checks do not exercise this mismatch. |
## Summary Fix Hermes custom Anthropic routing by using the endpoint's verified OpenAI Chat Completions surface end to end. NemoClaw selects `https://inference.local/v1`, verifies `/v1/chat/completions`, and aligns the OpenShell provider to `type=openai` with `OPENAI_BASE_URL`, avoiding the duplicate Anthropic SSE `message_start` sequence that caused `hermes -z` to finish with `no final response`. The core managed-frontend direction was first proposed by @chengjiew in #6295, and Chengjie Wang is included as a commit co-author. @TonyLuo-NV's #6297 contributed streaming-failure investigation and regression analysis. Thanks to @hulynn for the reproducible managed-proxy report. ## Related Issue Fixes #6289 ## Changes - Resolve Hermes `compatible-anthropic-endpoint` routes to the managed `openai-completions` frontend and reuse #6298's verified OpenAI-surface provider registration while retaining `COMPATIBLE_ANTHROPIC_API_KEY` as the credential binding. - Persist the normalized frontend during fresh onboarding; repair stale provider identity, registry metadata, and sandbox configuration during rebuild or resume. - Reject conflicting explicit API choices and legacy `type=anthropic` runtime switches before mutating OpenShell, registry, or in-sandbox state. - Preserve native Anthropic Messages routing for OpenClaw custom endpoints and first-party Anthropic routes; preserve the existing AWS Bedrock adapter behavior. - Extend unit, integration, command-shape, and live E2E coverage, including the reported `hermes -z` path; document the verified-surface requirement and rebuild migration. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent final review found no blockers. Endpoint probing and provider replacement reuse the fail-closed #6298 boundary; this PR adds exact non-secret provider identity checks and introduces no credential values. Human maintainer approval remains required. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 289 CLI tests, 7 OpenAI-surface onboarding integration tests, 1 focused Hermes config integration test, and 18 E2E support tests passed - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — required GitHub Actions checks pending - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — completed with 0 errors and 2 existing Fern warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Additional local verification: - `npm run build:cli` - `npm run typecheck:cli` - `npm run checks` - `npm run test-size:check` - `npm run test:titles:check` - `npm run source-shape:check` - `npm run test:projects:check` - `npm run test:imports:check` - `npm run docs` (0 errors; 2 existing warnings) --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> --------- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Chengjie Wang <chengjiew@nvidia.com> Co-authored-by: Chengjie Wang <chengjiew@nvidia.com>
|
Closing as superseded by #6335, which merged the same Hermes compatible-Anthropic routing fix end to end, explicitly credits #6295, and also adds the required OpenShell provider registration, validation, migration, and broader regression coverage. Rebasing #6295 onto current main resolves all four conflicts to the #6335 implementation and leaves no remaining diff, so a conflict-only merge commit would not add code to v0.0.75. |
…nboarding (#6289) (#6297) ## Summary Custom Anthropic-compatible endpoints were validated with a non-streaming `/v1/messages` probe only, so endpoints whose SSE streaming layer is malformed (e.g. duplicate `message_start` events with the same message id, observed on the Inference Hub route) passed onboarding and then failed at runtime inside the sandbox with Hermes' cryptic `no final response was produced` (exit 1). This PR adds streaming-event validation to the custom Anthropic onboarding path — mirroring the existing `/v1/responses` streaming validation from #1833 — so the defect is diagnosed at onboarding time with an actionable message. ## Related Issue Refs #6289 This PR is the onboarding guardrail for the malformed Anthropic SSE signature. It intentionally rejects a broken compatible endpoint before sandbox creation; the functional runtime routing fix remains in #6295. ## Changes - Add `runAnthropicStreamingEventProbe` (`src/lib/adapters/http/probe.ts`): sends a `stream: true` request to `/v1/messages` and validates the SSE event sequence — exactly one `message_start`, at least one `content_block_delta`, one `message_stop`. Refactors the shared curl/SSE capture into `captureSseEventCounts`, reused by the existing `/v1/responses` streaming probe with identical behavior (trace events, temp cleanup, curl exit-28 tolerance). - Wire the streaming probe into `probeAnthropicEndpoint` behind a new `{ probeStreaming }` option (`src/lib/inference/probe-anthropic.ts`); tighter `--max-time 15` timing so validation cannot hang the wizard. - Enable it in `validateCustomAnthropicSelection` (`src/lib/onboard/inference-selection-validation.ts`). Skipped when `NEMOCLAW_REASONING=true`, matching the custom OpenAI-compatible path. The official Anthropic provider path is unchanged; Bedrock-classified endpoints are unaffected (streaming probe only runs after the non-streaming `/v1/messages` probe succeeds). - Move the two Anthropic credential-retry integration tests into a focused `test/onboard-selection-anthropic-retry.test.ts` (fake curl now serves a well-formed SSE stream for `"stream":true` probe bodies), shrinking `test/onboard-selection.test.ts` below its legacy size budget; budget ratcheted down 6146 → 5935. - Docs: validation-table row and Anthropic-compatible server section in `docs/inference/inference-options.mdx`; new troubleshooting entry for the onboarding-time duplicate `message_start` failure in `docs/reference/troubleshooting.mdx`. ## Type of Change - [x] Code change with doc updates ## Quality Gates - [x] Tests added or updated for changed behavior - [x] Docs updated for user-facing behavior changes - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: requesting maintainer review; probes reuse the existing trusted `--config` credential routing (no credential appears in argv), and the new probe adds no new credential surface. ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result: `npx vitest run src/lib/adapters/http/probe.test.ts src/lib/inference/probe-anthropic.test.ts src/lib/onboard/inference-selection-validation.test.ts --project cli` (68 passed); `npx vitest run test/onboard-selection.test.ts --project integration` (67 passed); `npx vitest run test/onboard-selection-anthropic-retry.test.ts --project integration` (2 passed); `npx vitest run src/lib/inference/onboard-probes.test.ts src/lib/inference/onboard-probes-responses-fallback.test.ts --project cli` (25 passed, 1 skipped); `npm run test:projects:check` (disjoint); `npm run typecheck:cli` (clean) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [x] `npm run docs` builds without warnings (doc changes only) — 0 errors; 2 pre-existing warnings on main (login-gated redirects check, theme contrast), unrelated to this change ## DCO Signed-off-by: Tony Luo <xialuo@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Anthropic-compatible streaming SSE validation during onboarding to catch malformed `/v1/messages` event sequences. * Streaming validation can be skipped for reasoning-only models via `NEMOCLAW_REASONING`. * **Bug Fixes** * Improved reporting and recovery behavior for missing, duplicate, and out-of-order streaming events, including clearer diagnostic messaging. * **Documentation** * Updated inference validation docs and added troubleshooting guidance for onboarding failures caused by malformed SSE events. * **Tests** * Expanded streaming probe and onboarding validation tests; added Anthropic onboarding retry UX coverage; removed obsolete Anthropic retry tests. * **Chores** * Adjusted CI test file size budget. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Tony Luo <xialuo@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
## Summary Fix Hermes custom Anthropic routing by using the endpoint's verified OpenAI Chat Completions surface end to end. NemoClaw selects `https://inference.local/v1`, verifies `/v1/chat/completions`, and aligns the OpenShell provider to `type=openai` with `OPENAI_BASE_URL`, avoiding the duplicate Anthropic SSE `message_start` sequence that caused `hermes -z` to finish with `no final response`. The core managed-frontend direction was first proposed by @chengjiew in NVIDIA#6295, and Chengjie Wang is included as a commit co-author. @TonyLuo-NV's NVIDIA#6297 contributed streaming-failure investigation and regression analysis. Thanks to @hulynn for the reproducible managed-proxy report. ## Related Issue Fixes NVIDIA#6289 ## Changes - Resolve Hermes `compatible-anthropic-endpoint` routes to the managed `openai-completions` frontend and reuse NVIDIA#6298's verified OpenAI-surface provider registration while retaining `COMPATIBLE_ANTHROPIC_API_KEY` as the credential binding. - Persist the normalized frontend during fresh onboarding; repair stale provider identity, registry metadata, and sandbox configuration during rebuild or resume. - Reject conflicting explicit API choices and legacy `type=anthropic` runtime switches before mutating OpenShell, registry, or in-sandbox state. - Preserve native Anthropic Messages routing for OpenClaw custom endpoints and first-party Anthropic routes; preserve the existing AWS Bedrock adapter behavior. - Extend unit, integration, command-shape, and live E2E coverage, including the reported `hermes -z` path; document the verified-surface requirement and rebuild migration. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent final review found no blockers. Endpoint probing and provider replacement reuse the fail-closed NVIDIA#6298 boundary; this PR adds exact non-secret provider identity checks and introduces no credential values. Human maintainer approval remains required. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 289 CLI tests, 7 OpenAI-surface onboarding integration tests, 1 focused Hermes config integration test, and 18 E2E support tests passed - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — required GitHub Actions checks pending - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — completed with 0 errors and 2 existing Fern warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Additional local verification: - `npm run build:cli` - `npm run typecheck:cli` - `npm run checks` - `npm run test-size:check` - `npm run test:titles:check` - `npm run source-shape:check` - `npm run test:projects:check` - `npm run test:imports:check` - `npm run docs` (0 errors; 2 existing warnings) --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> --------- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Chengjie Wang <chengjiew@nvidia.com> Co-authored-by: Chengjie Wang <chengjiew@nvidia.com>
…nboarding (NVIDIA#6289) (NVIDIA#6297) ## Summary Custom Anthropic-compatible endpoints were validated with a non-streaming `/v1/messages` probe only, so endpoints whose SSE streaming layer is malformed (e.g. duplicate `message_start` events with the same message id, observed on the Inference Hub route) passed onboarding and then failed at runtime inside the sandbox with Hermes' cryptic `no final response was produced` (exit 1). This PR adds streaming-event validation to the custom Anthropic onboarding path — mirroring the existing `/v1/responses` streaming validation from NVIDIA#1833 — so the defect is diagnosed at onboarding time with an actionable message. ## Related Issue Refs NVIDIA#6289 This PR is the onboarding guardrail for the malformed Anthropic SSE signature. It intentionally rejects a broken compatible endpoint before sandbox creation; the functional runtime routing fix remains in NVIDIA#6295. ## Changes - Add `runAnthropicStreamingEventProbe` (`src/lib/adapters/http/probe.ts`): sends a `stream: true` request to `/v1/messages` and validates the SSE event sequence — exactly one `message_start`, at least one `content_block_delta`, one `message_stop`. Refactors the shared curl/SSE capture into `captureSseEventCounts`, reused by the existing `/v1/responses` streaming probe with identical behavior (trace events, temp cleanup, curl exit-28 tolerance). - Wire the streaming probe into `probeAnthropicEndpoint` behind a new `{ probeStreaming }` option (`src/lib/inference/probe-anthropic.ts`); tighter `--max-time 15` timing so validation cannot hang the wizard. - Enable it in `validateCustomAnthropicSelection` (`src/lib/onboard/inference-selection-validation.ts`). Skipped when `NEMOCLAW_REASONING=true`, matching the custom OpenAI-compatible path. The official Anthropic provider path is unchanged; Bedrock-classified endpoints are unaffected (streaming probe only runs after the non-streaming `/v1/messages` probe succeeds). - Move the two Anthropic credential-retry integration tests into a focused `test/onboard-selection-anthropic-retry.test.ts` (fake curl now serves a well-formed SSE stream for `"stream":true` probe bodies), shrinking `test/onboard-selection.test.ts` below its legacy size budget; budget ratcheted down 6146 → 5935. - Docs: validation-table row and Anthropic-compatible server section in `docs/inference/inference-options.mdx`; new troubleshooting entry for the onboarding-time duplicate `message_start` failure in `docs/reference/troubleshooting.mdx`. ## Type of Change - [x] Code change with doc updates ## Quality Gates - [x] Tests added or updated for changed behavior - [x] Docs updated for user-facing behavior changes - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: requesting maintainer review; probes reuse the existing trusted `--config` credential routing (no credential appears in argv), and the new probe adds no new credential surface. ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result: `npx vitest run src/lib/adapters/http/probe.test.ts src/lib/inference/probe-anthropic.test.ts src/lib/onboard/inference-selection-validation.test.ts --project cli` (68 passed); `npx vitest run test/onboard-selection.test.ts --project integration` (67 passed); `npx vitest run test/onboard-selection-anthropic-retry.test.ts --project integration` (2 passed); `npx vitest run src/lib/inference/onboard-probes.test.ts src/lib/inference/onboard-probes-responses-fallback.test.ts --project cli` (25 passed, 1 skipped); `npm run test:projects:check` (disjoint); `npm run typecheck:cli` (clean) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [x] `npm run docs` builds without warnings (doc changes only) — 0 errors; 2 pre-existing warnings on main (login-gated redirects check, theme contrast), unrelated to this change ## DCO Signed-off-by: Tony Luo <xialuo@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Anthropic-compatible streaming SSE validation during onboarding to catch malformed `/v1/messages` event sequences. * Streaming validation can be skipped for reasoning-only models via `NEMOCLAW_REASONING`. * **Bug Fixes** * Improved reporting and recovery behavior for missing, duplicate, and out-of-order streaming events, including clearer diagnostic messaging. * **Documentation** * Updated inference validation docs and added troubleshooting guidance for onboarding failures caused by malformed SSE events. * **Tests** * Expanded streaming probe and onboarding validation tests; added Anthropic onboarding retry UX coverage; removed obsolete Anthropic retry tests. * **Chores** * Adjusted CI test file size budget. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Tony Luo <xialuo@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
NemoClaw now keeps Hermes compatible-Anthropic endpoint switches on the managed OpenAI-compatible inference route so
hermes -zavoids the broken Anthropic SSE message stream. True Anthropic provider routing remains on Anthropic Messages, and the runtime switching docs now describe that distinction.Related Issue
Fixes #6289
Changes
compatible-anthropic-endpointruntime API resolution toopenai-completionsinsrc/lib/actions/inference-route-api.ts.src/lib/actions/inference-route-api.test.tsfor Hermes compatible-Anthropic endpoint routing.src/lib/actions/inference-set-hermes-run.test.tsto assert Hermes writes the managed/v1OpenAI-compatible proxy config withoutanthropic_messagesmode.docs/inference/switch-inference-providers.mdx.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablegit diff --check && npm test -- src/lib/actions/inference-route-api.test.ts src/lib/actions/inference-set-hermes-run.test.tspassed; 2 files and 15 tests.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result: fullnpm testwas attempted after focused verification but exceeded the interactive delivery window and was terminated as stale; the changed inference-route tests passed.npm run docsbuilds without warnings (doc changes only):npm run docsexited 0 with 0 errors; Fern reported 2 warnings.Signed-off-by: Chengjie Wang chengjiew@nvidia.com
Summary by CodeRabbit