Skip to content

Fix optional config typing and prepare v2.13.1 - #320

Merged
Eigenwise merged 3 commits into
mainfrom
fix/agent-config-defaults
Oct 19, 2026
Merged

Eigenwise merged 3 commits into
mainfrom
fix/agent-config-defaults

Conversation

@Eigenwise

Copy link
Copy Markdown
Owner

Fix

Declare AgentConfig.model_api_parameters and AgentConfig.max_context_tokens with explicit Field(default=None, ...) defaults. Pyright 1.1.414 treated both positional defaults as required constructor arguments, affecting direct calls and typed settings unpacking. Runtime defaults remain unchanged.

Add a focused Pyright check to CI and a runtime constructor regression. Prepare 2.13.1 with release notes and updated codebase map. Runtime requirements are unchanged. This branches from main and excludes the OpenTelemetry discovery feature in #319.

Verification

  • Genuine 2.13.0 source: the new typing fixture produces two missing-argument errors.
  • Fixed source: Pyright reports zero errors.
  • Full suite: 648 passed, 3 skipped on locked Pydantic 2.12.4 and again on 2.12.5.
  • Black and Flake8 passed across all four project directories.
  • No live model calls or private application data.

The explicit keyword default is the form recommended in Pydantic's type-checker documentation.

🤖 Generated with Claude Code

Kenny Vaneetvelde and others added 3 commits October 20, 2026 00:03
Pyright 1.1.414 reported model_api_parameters and max_context_tokens as required for direct and TypedDict-based construction. Explicit default=None removes both errors while preserving runtime defaults. Add a focused typing check and runtime regression.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Bump the package version and record the verified AgentConfig typing fix. Runtime dependency requirements are unchanged.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Update package metadata and the verified explicit-default convention in the existing codebase map.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Eigenwise
Eigenwise merged commit 29c7e81 into main Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant