cadrumo.adapters.outbound.llm.role_fitness module¶
Fitness probe for the on-host text reader: its real request, on a document it can check.
Presence and a one-token answer prove a model is loaded; they do not prove it
can do the text reader’s job. A vision model configured in the text role loads,
answers ok, and then spends the whole extraction answer budget without
producing anything the parser can read – so every document refuses while every
readiness check passes.
This probe sends the text reader’s own prompt, rendered by the same builder, with the same answer budget and temperature the reader’s requests inherit, over the same local transport, and grounds the reply with the same parser and field grounding. The document is synthetic and carries no identifier, so nothing sensitive is sent and no taxpayer fact is involved. The model is fit when the reply parses and the two values the probe checks ground to what the document prints.
The probe calls the transport directly rather than through the caching client: a fitness answer must come from the model now, never from a stored reply, and it must run without an unlocked profile.
- probe_text_extraction_fitness(model, settings)[source]¶
Send the text reader’s real request to
modeland judge whether its answer is usable.Never raises. A model still answering when the probe’s timeout expires is reported
timed_outunder its own condition; any other transport failure is reported withtransport_failedso the caller does not record it as the model’s fitness.- Return type:
- Parameters: