Skip to content

Python: Reject per-call Mistral transport options - #8392

Merged
Jose Alvarez (jpalvarezl) merged 1 commit into
microsoft:mainfrom
jpalvarezl:agents/mistral-verification-harness-setup
Sep 15, 2026
Merged

Jose Alvarez (jpalvarezl) merged 1 commit into
microsoft:mainfrom
jpalvarezl:agents/mistral-verification-harness-setup

Conversation

@jpalvarezl

Copy link
Copy Markdown
Member

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

  • What are the major changes? Check both options and client_kwargs for the existing set of SDK transport arguments before preparing a chat request. Document the client-configuration contract.
  • What is the impact of these changes? Per-call transport arguments raise the existing ValueError regardless of their input container. Constructor-supplied endpoints, injected clients, and normal generation options remain supported. No dependency changes.
  • What do you want reviewers to focus on? Consistent rejection across raw and full clients, streaming and non-streaming calls, and Responses-derived agent options. The mock-transport regressions also cover mixed inputs, null handling, and preservation of configured endpoints and generation options.

Related Issue

No public issue linked.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (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.

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>
Copilot AI balanced review requested due to automatic review settings September 15, 2026 12:36
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Sep 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jpalvarezl
Jose Alvarez (jpalvarezl) added this pull request to the merge queue Sep 15, 2026
Merged via the queue into microsoft:main with commit 6da8680 Sep 15, 2026
56 checks passed
@jpalvarezl
Jose Alvarez (jpalvarezl) deleted the agents/mistral-verification-harness-setup branch September 15, 2026 14:56

This branch was previously deployed

1 inactive deployment
github-app-auth — e06d2eb5 Deployed Sep 15, 2026 by jpalvarezl via team_check #4451
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants