-
-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Description
Description
Type checking is failing in instructor/providers/mistral/client.py with 54 diagnostics related to passing **kwargs to the Mistral client's complete() and stream() methods.
Error Details
The type checker reports invalid-argument-type errors when passing **kwargs to client.chat.complete(*args, **kwargs) and client.chat.stream(*args, **kwargs).
Sample errors:
- Expected
str | list[str] | list[int] | None, founddict[str, Any]formessagesparameter - Expected
str | None, founddict[str, Any]formodelparameter - Expected
int | float | None, founddict[str, Any]for various numeric parameters - Expected
bool | None, founddict[str, Any]for boolean parameters
Location
instructor/providers/mistral/client.py:77-78
Impact
- Blocking type checking in CI
- Not affecting runtime behavior
- 54 type diagnostics total
Suggested Fix
Need to properly type the wrapper function or use type: ignore comments with appropriate justification. The **kwargs pattern may need to be replaced with explicit parameter passing or proper Protocol/TypedDict definitions.
Related
This is blocking CI on PR #1947 and potentially other PRs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels