Skip to content

fix(router): accept decoded logprobs and explain probe failures - #3586

Merged
nonoqing merged 2 commits into
mainfrom
codex/publish-router-probe-fixes-20261028
Oct 28, 2026
Merged

nonoqing merged 2 commits into
mainfrom
codex/publish-router-probe-fixes-20261028

Conversation

@nonoqing

Copy link
Copy Markdown
Collaborator

Summary

Accept decoded simple / non classifier logprob candidates alongside token-ID spellings. Valid Router responses can now pass probability parsing while retaining token alignment, two-class confidence calculation, and rejection of missing, conflicting, or invalid probabilities.

Validate the Router API format before constructing its endpoint, and show safe localized probe failure details. Keep Smart mode disabled in release builds; the local testing override is excluded.

Type and Areas

Type: Bug fix

Areas: AI adapters, Rust Core routing configuration, Web UI model settings and locales

Motivation / Impact

OpenBitFun Router services can return valid token IDs with decoded candidate strings. These requests previously failed connection checks. The settings dialog also discarded the host's Router failure reason, leaving users with an unexplained failure marker. This change handles the compatible response shape and provides actionable, privacy-safe feedback.

Verification

  • cargo test --locked -p openbitfun-ai-adapters --lib round_router: 11 passed
  • cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,subscription-auth --lib round_model_routing: 106 passed, 2 ignored
  • cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,subscription-auth --lib smart_release_gate: 7 passed, 1 ignored
  • Focused frontend Router configuration, routing hook, session draft and mocked Peer adapter suite: 211 passed
  • pnpm run check:web, pnpm run i18n:audit and diff checks passed
  • Live OpenBitFun Router requests verified before submission

Reviewer Notes

The committed SMART_MODE_RELEASE_AVAILABLE remains false. The UI reuses its existing failure-detail area. Tests cover mocked Peer capability behavior; live SSH workspace, relay control, peer-device and detached-dispatch product scenarios were not exercised.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Accept decoded classifier candidates while preserving token alignment,
two-class confidence calculation, and strict rejection of invalid probabilities.
Validate the Router API format before constructing a classifier endpoint and
show safe localized failure details in the model-routing connection check.

Keep the Smart mode release gate disabled; exclude the local dev override.

Validation: Router adapter 11 tests, focused Core 6 tests, frontend routing
211 tests, i18n audit, type checking, and diff checks passed. The broader
check:web audit is blocked by an existing untracked MiniApp registry mismatch.
Merge 2584bb8 with current upstream main, retaining the Router probability
compatibility and safe localized connection-test feedback.

Keep Smart mode unavailable in release builds. The local dev enable override
is excluded from both the original repair commit and this merge.

Validation on the integrated tree: Router adapter 11 tests, Core routing
106 tests, release gate 7 tests, frontend routing 211 tests, check:web,
i18n audit, and diff checks passed.
@nonoqing
nonoqing merged commit 7033933 into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant