Add typed MergeBreakdownResponse and Claude 4.6 LLM variants#117
Add typed MergeBreakdownResponse and Claude 4.6 LLM variants#117nikosbosse merged 4 commits intomainfrom
Conversation
Regenerated models from current API spec: - Add MergeBreakdownResponse typed model to TaskResultResponse, replacing hand-parsed additional_properties in _extract_merge_breakdown() - Add CLAUDE_4_6_OPUS_* variants to LLMEnumPublic enum Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use (p[0], p[1]) instead of tuple(p) so basedpyright infers tuple[int, int] rather than tuple[int, ...]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
CLAUDE: Looks good overall. The typed MergeBreakdownResponse is a clear improvement over the additional_properties dict access.
One minor observation on task.py:167-173:
exact=[(p[0], p[1]) for p in mb.exact] if not isinstance(mb.exact, Unset) else [],The old code used mb.get("exact", []) or [] which also guarded against None/falsy values. The new code only guards against Unset. This is fine since the type annotation is list[list[int]] | Unset (no None), but it's a subtle behavioral change worth noting — if the API ever returns null for one of these fields instead of omitting it, the generated model type would need updating first anyway.
The index access p[0], p[1] (vs the old tuple(p)) is more explicit about expecting pairs, which is better.
No issues found. Ship it.
|
@straeter Claude caught this as a drive-by improvement from a different PR and is confident this is better. Could you have a quick look please? I don't feel strongly either way. |
|
I noted that something didn't go quite right when I deployed this, so I'm sure whatever this is will be an improvement! |
Resolve import formatting conflicts in task_result_response.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

CLAUDE:
Summary
MergeBreakdownResponsetyped model from regenerated API spec, replacing hand-parsedadditional_propertiesin_extract_merge_breakdown()CLAUDE_4_6_OPUS_*variants toLLMEnumPublicenumTaskResultResponsewith typedmerge_breakdownfieldThe
MergeBreakdownResponsemodel was previously picked up during an OpenAPI regen in #110 but didn't belong there. This gives merge breakdown extraction proper type safety instead of relying on dict access.Test plan
🤖 Generated with Claude Code