Skip to content

Expose Jev's confidence and probabilities (route_details) #14

Description

@TheCoder30ec4

Motivation

Jev returns a confidence value and a probability for each candidate, but route() throws them away. Callers could use them to fall back to a safe default when confidence is low, to log decisions, or to A/B test.

Proposal

Keep route() returning a plain str (no breaking change) and add:

result = router.route_details(task)
result.model          # "openai/gpt-6-luna"
result.confidence     # 0.95 or None (e.g. when Jev was skipped)
result.probabilities  # {"openai/gpt-6-luna": 0.96, ...}, keyed by real model id, not alias
result.candidates     # ids that passed the limits
result.rejected       # {model_id: reason}

Both backends need mapping: OpenRouter answers use aliases m0..mN, and Jev returns data.probabilities.

Done when

  • Works for both backends and for the case where only one model is left
  • Tests plus a README example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: routingRouter, limits and the Jev requestenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions