Repository navigation
fix(router): accept decoded logprobs and explain probe failures - #3586
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Accept decoded
simple/nonclassifier 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 passedcargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,subscription-auth --lib round_model_routing: 106 passed, 2 ignoredcargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,subscription-auth --lib smart_release_gate: 7 passed, 1 ignoredpnpm run check:web,pnpm run i18n:auditand diff checks passedReviewer Notes
The committed
SMART_MODE_RELEASE_AVAILABLEremainsfalse. 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