Commit d23e3ab
authored
Add RuntimeConfig declared fields + null-skip (proposal 0032) (#78)
* Add RuntimeConfig declared fields + null-skip
Implements proposal 0032 (spec v0.24.0). Three OpenAI-standard
sampling parameters promoted from the extras pass-through to declared
fields on RuntimeConfig: frequency_penalty, presence_penalty, and
stop_sequences. The declared name stop_sequences matches the
OpenTelemetry GenAI semconv (and Anthropic / Gemini wire-key
conventions); the OpenAI-compatible wire mapping translates it to
OpenAI's shorter body key stop on emission, per spec §8.1.
Null-skip is now uniform across all seven declared fields: a field
set to None is omitted from the wire body entirely (no JSON null).
The existing four fields already followed this pattern; the three
new fields extend it.
OTel observer emits gen_ai.request.frequency_penalty,
gen_ai.request.presence_penalty, and gen_ai.request.stop_sequences
on the LLM span when the corresponding RuntimeConfig field is set
(per observability §5.5.2's expanded attribute list).
RuntimeConfig.from_partial(**kwargs) classmethod is a pure Python
ergonomic that drops None-valued kwargs before construction. The
wire layer already null-skips, so this is convenience only.
Spec submodule bumped to v0.24.0; conformance.toml grows entries for
proposals 0031 (langfuse mapping, not-yet) and 0032 (not-yet here,
flips to implemented with since=0.10.0 in the release PR).
Tests: fixture llm-provider/032 and observability/025 pass. Langfuse
fixtures 022-024 deferred in the parser harness until PR 3 ships the
matching directive model.
* Strengthen from_partial drop-Nones test
The is-None assertions on max_tokens and seed weren't load-bearing:
both fields default to None on a base RuntimeConfig, so the test
would have passed even if from_partial forwarded the None kwargs.
Added model_fields_set assertions, which carry only fields the
caller explicitly set during construction, to prove the drop.
Addresses CoPilot PR review feedback on #78.1 parent fcb3718 commit d23e3ab
15 files changed
Lines changed: 190 additions & 26 deletions
File tree
- docs/concepts
- src/openarmature
- llm
- providers
- observability/otel
- tests
- conformance
- harness
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
432 | | - | |
| 433 | + | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
Submodule openarmature-spec updated 26 files
- .github/workflows/validate-markdown.yaml+4
- CHANGELOG.md+50
- README.md+15-12
- docs/open-questions.md+11
- docs/proposals.md+38-32
- docs/proposals/0031-observability-langfuse-mapping.md+1
- docs/proposals/0032-llm-provider-runtime-config-refinements.md+1
- proposals/0031-observability-langfuse-mapping.md+623
- proposals/0032-llm-provider-runtime-config-refinements.md+383
- scripts/regenerate_proposals_impl_tracking.py+172
- spec/llm-provider/conformance/032-runtime-config-declared-fields-and-null-skip.md+54
- spec/llm-provider/conformance/032-runtime-config-declared-fields-and-null-skip.yaml+122
- spec/llm-provider/spec.md+44-4
- spec/observability/conformance/011-otel-determinism.md+3-3
- spec/observability/conformance/011-otel-determinism.yaml+1-1
- spec/observability/conformance/018-otel-llm-request-extras.md+5-4
- spec/observability/conformance/018-otel-llm-request-extras.yaml+4-4
- spec/observability/conformance/022-langfuse-basic-trace.md+50
- spec/observability/conformance/022-langfuse-basic-trace.yaml+114
- spec/observability/conformance/023-langfuse-generation-rendering.md+67
- spec/observability/conformance/023-langfuse-generation-rendering.yaml+131
- spec/observability/conformance/024-langfuse-prompt-linkage.md+59
- spec/observability/conformance/024-langfuse-prompt-linkage.yaml+133
- spec/observability/conformance/025-otel-llm-request-params-extended.md+39
- spec/observability/conformance/025-otel-llm-request-params-extended.yaml+64
- spec/observability/spec.md+348-17
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
| |||
431 | 436 | | |
432 | 437 | | |
433 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
434 | 445 | | |
435 | | - | |
436 | | - | |
| 446 | + | |
| 447 | + | |
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
| |||
1111 | 1122 | | |
1112 | 1123 | | |
1113 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1114 | 1134 | | |
1115 | 1135 | | |
1116 | 1136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
125 | 151 | | |
126 | 152 | | |
127 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
768 | 779 | | |
769 | 780 | | |
770 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| |||
0 commit comments