• Stefy Lanza (nextime / spora )'s avatar
    ocr: a confidence nobody measured is worse than none (v0.3.8) · 903797e0
    Stefy Lanza (nextime / spora ) authored
    Surya asks every request for logprobs and averages exp(logprob) over the
    generated tokens to score each line. coderai accepted the parameter, never
    sent it, and hardcoded `logprobs: None` in every response builder.
    
    Surya's fallback is what makes that expensive: with no logprobs it does not
    report "unknown", it reports a literal 1.0 (recognition/__init__.py:248, :302,
    layout/__init__.py:97). Every line of every page comes back perfectly
    confident, the guesses included, and nothing downstream can tell which
    judicial document needs a human to look at it.
    
    So the round trip is wired where it can exist: the proxy backends (vLLM,
    RunPod) forward `logprobs`/`top_logprobs` and hand back what the server
    measured, buffered and streamed, accumulating the streamed pieces into one
    response-shaped object. The manager asks the backend's signature rather than
    negotiating by TypeError, which would have called it twice for a kwarg it
    never had. A request that did not ask is sent exactly as before, and a
    backend that cannot answer still returns null.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PxYHWbCAjjjD7A1rhFKtaW
    903797e0
Name
Last commit
Last update
..
admin Loading commit data...
api Loading commit data...
backends Loading commit data...
broker Loading commit data...
cluster Loading commit data...
compose Loading commit data...
frontproxy Loading commit data...
models Loading commit data...
ocr Loading commit data...
openai Loading commit data...
pydantic Loading commit data...
queue Loading commit data...
tasks Loading commit data...
util Loading commit data...
__init__.py Loading commit data...
cli.py Loading commit data...
config.py Loading commit data...
main.py Loading commit data...
platform_paths.py Loading commit data...
system_app.py Loading commit data...