Repository navigation
Python: Reject per-call Mistral transport options - #8392
Jose Alvarez (jpalvarezl) merged 1 commit into
Conversation
Apply the existing transport-argument restriction to both options and client_kwargs. Add mock-transport regression coverage while preserving constructor configuration and normal generation options. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation is documented and comprehensively covered across affected request paths.
Pull request overview
Consistently rejects request-scoped Mistral transport settings while preserving client configuration and generation options.
Changes:
- Validates transport arguments across both option containers.
- Documents the client-configuration contract.
- Adds streaming, client-type, endpoint, null, and Responses integration coverage.
File summaries
| File | Description |
|---|---|
python/packages/mistral/agent_framework_mistral/_chat_client.py |
Rejects transport arguments from both per-call sources. |
python/packages/mistral/README.md |
Documents transport configuration requirements. |
python/packages/mistral/tests/mistral/test_mistral_chat_client.py |
Adds comprehensive Mistral regression coverage. |
python/packages/hosting-responses/tests/hosting_responses/test_parsing.py |
Verifies provider-option preservation and null omission. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): e06d2eb5afc5
Model: gpt-5.6-sol-fast
Overview
This PR extends the existing Mistral transport-argument rejection to inspect both validated options and forwarded client kwargs, while documenting that connection settings are client-scoped. The regression coverage exercises both client variants and response modes, null and split inputs, Responses conversion, and preservation of configured endpoints and generation options. No Critical, High, or Medium residual risk was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Motivation & Context
Apply the existing per-call transport restriction consistently to Mistral chat inputs. Connection settings belong to client configuration, while model generation options remain request-scoped.
Description & Review Guide
optionsandclient_kwargsfor the existing set of SDK transport arguments before preparing a chat request. Document the client-configuration contract.ValueErrorregardless of their input container. Constructor-supplied endpoints, injected clients, and normal generation options remain supported. No dependency changes.Related Issue
No public issue linked.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after a language prefix) — a workflow keeps the label and the title prefix in sync automatically.