You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: delegate default model selection to providers (#48)
## What
- delegates the no-override model choice to each provider instead of
pinning library-owned names
- preserves one precedence chain: task field > legacy metadata >
constructor override > provider-native
- omits vendor model kwargs when selection is provider-native
- records `model_source` on every provider result and records `model`
only when known
- keeps `default_model=` as an explicit migration override
- makes configured model allow-lists fail closed when provider-native
selection cannot be verified
## Why
Hard-coded adapter defaults age faster than the SDK and can override
supported provider configuration. The SDK-evolution docs already
described Claude and Antigravity as provider-native, but the adapters
silently forced stale model names.
## Root cause
Model resolution treated the library constructor default as mandatory
rather than an optional override, and result metadata could not
distinguish task, metadata, constructor, and provider-native selection.
## Compatibility
This is an intentional pre-1.0 behavior change. Applications that need
the prior pin can pass the same value through `default_model=`; task and
metadata overrides keep their existing precedence.
## Checks
- `ruff check src tests`
- strict `mypy`
- full all-extras suite: 396 passed, 3 skipped
- model-policy coverage run: 356 passed, 3 skipped; 91.00% coverage
- installed SDK contracts: 23 passed
- `uv lock --check`
- `uv build`
## Stack
- Base: #47
- Next: #49
0 commit comments