feat(llm): a request carries how much the model thinks, in each provider's field
LlmRequest.effort (LlmEffort: low, medium, high, xhigh, max, Anthropic's names) goes as Anthropic's output_config.effort, as reasoning.effort to the Responses API and OpenRouter, and as reasoning_effort to OpenAI's chat completions, Gemini and any other host. endpoint.efforts says which levels a host takes (Gemini low to high, Mistral none); send refuses another before anything goes, the fake client too. LlmEffort.outputCeiling gives the room for output each level wants, as thinking counts towards the ceiling (Halkyon Learn's ADR 0021, D63). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
33c9a7df1c
commit
0590a4b43d
1 changed files with 291 additions and 10 deletions
|
|
@ -52,4 +52,31 @@ void main() {
|
|||
expect(_at(url).onThisMachine, isFalse, reason: url);
|
||||
}
|
||||
});
|
||||
|
||||
group('effort (D63)', () {
|
||||
test('runs from low to max, by name', () {
|
||||
expect(LlmEffort.values.map((effort) => effort.key), [
|
||||
'low',
|
||||
'medium',
|
||||
'high',
|
||||
'xhigh',
|
||||
'max',
|
||||
]);
|
||||
expect(LlmEffort.named('xhigh'), LlmEffort.xhigh);
|
||||
expect(LlmEffort.named('XHIGH'), isNull);
|
||||
expect(LlmEffort.named('minimal'), isNull);
|
||||
});
|
||||
|
||||
test('leaves more room for output the higher it is: what the model thinks '
|
||||
'counts towards the ceiling', () {
|
||||
expect(LlmEffort.values.map((effort) => effort.outputCeiling), [
|
||||
8192,
|
||||
12288,
|
||||
16384,
|
||||
32768,
|
||||
65536,
|
||||
]);
|
||||
expect(LlmEffort.defaultOutputCeiling, LlmEffort.high.outputCeiling);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue