Skip to content

Python: Upgrade Onnx Connector to use 0.9.0 - #13162

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 11 commits into
microsoft:mainfrom
nmoeller:feature/update_onnx_connector
Nov 11, 2025
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 11 commits into
microsoft:mainfrom
nmoeller:feature/update_onnx_connector

Conversation

@nmoeller

@nmoeller Nico Möller (nmoeller) commented Sep 21, 2025 •

Copy link
Copy Markdown
Contributor

Motivation and Context

Fixes : #13001

Description

Package version 0.9.0 introduced very helpful methods like applying chat templates automatically from the tokenizer and also support for multi audio & image files.

This PR adds the following functionalities:

  • Add Inference with multiple Images
  • Add Inference with multiple Audios
  • Chat Templates for non Multimodal Models are read via onnx

Samples

Text Sample with ONNX:
image

Image Sample with ONNX :
image

Contribution Checklist

@nmoeller
Nico Möller (nmoeller) requested a review from a team as a code owner September 21, 2025 10:57
@moonbox3 Evan Mattson (moonbox3) added the python Pull requests for the Python Semantic Kernel label Sep 21, 2025
@github-actions github-actions Bot changed the title Upgrade Onnx Connector to use 0.9.0 Python: Upgrade Onnx Connector to use 0.9.0 Sep 21, 2025
@moonbox3

Evan Mattson (moonbox3) commented Sep 21, 2025 •

Copy link
Copy Markdown
Collaborator

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
connectors/ai/onnx
   utils.py85396%55–56, 167
connectors/ai/onnx/services
   onnx_gen_ai_chat_completion.py901385%70–71, 85, 107, 134, 173, 179, 195, 205–208, 210
   onnx_gen_ai_completion_base.py622362%17–18, 40, 70–76, 80–85, 87–93
TOTAL27402460783% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3765 23 💤 0 ❌ 0 🔥 1m 44s ⏱️

@moonbox3

Copy link
Copy Markdown
Collaborator

Nico Möller (@nmoeller) thanks for handling this. Looks like the uv.lock needs a local refresh, and a push upstream.

@nmoeller

Copy link
Copy Markdown
Contributor Author

Evan Mattson (@moonbox3) always happy to help here ! I pushed an updated uv.lock file. Could you maybe restart the Pipelines here ? I think the error in the Check .md links pipeline was just temporary, since it says 403 forbidden to the .NET Download Link.

@moonbox3

Copy link
Copy Markdown
Collaborator

Nico Möller (@nmoeller) there are some conflicts we should fix.

auto-merge was automatically disabled November 7, 2025 07:18

Head branch was pushed to by a user without write access

@nmoeller

Copy link
Copy Markdown
Contributor Author

Evan Mattson (@moonbox3) my branch is updated with the latest changes of main now.

Merged via the queue into microsoft:main with commit 145ad9b Nov 11, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Bug: Simple python onnx connector sample not working as the library has not been updated with onnxruntime_genai api changes over past year

3 participants