Repository navigation
Python: TypeSafe: support inline images and Box questions (Jev 1.14) - #9411
Open
Zakaria Khchiche (Zakariakhchiche) wants to merge 4 commits into
Open
Zakaria Khchiche (Zakariakhchiche) wants to merge 4 commits into
Zakaria Khchiche (Zakariakhchiche) wants to merge 4 commits into
Conversation
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:39 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:39 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:40 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Compatibility of the new SDK APIs with the declared minimum and locked dependency versions remains unverified.
2 open findings
What changed in this PR
Adds experimental Jev 1.14 image and Box-question support to the Python TypeSafe connector, addressing #9410.
Changes:
- Converts inline images to SDK assets and conditionally sends the required opt-in header.
- Adds image transport and Box-response tests.
- Documents experimental usage and remote-image restrictions.
| File | Description |
|---|---|
python/packages/typesafe/tests/typesafe/test_chat_client.py |
Tests image handling, headers, and Box responses. |
python/packages/typesafe/README.md |
Documents experimental image and Box usage. |
python/packages/typesafe/AGENTS.md |
Updates the connector’s behavioral contract. |
python/packages/typesafe/agent_framework_typesafe/_chat_client.py |
Maps inline images and selects opt-in headers. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:49 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:55 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:55 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:55 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:56 — with
GitHub Actions
Active
Zakaria Khchiche (Zakariakhchiche)
marked this pull request as ready for review
October 15, 2026 11:58
Zakaria Khchiche (Zakariakhchiche)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 15, 2026 11:58
Zakaria Khchiche (Zakariakhchiche)
deployed
to
github-app-auth
October 15, 2026 11:58 — with
GitHub Actions
Active
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation & Context
TypeSafe released Jev 1.14 (
jev-1.14.0,jev-preview) with image inputs and a newBoxquestion type that locates a target in an image. Theagent-framework-typesafeconnector currently rejects every non-text message content, so Agent Framework users cannot send an image to Jev, andBoxquestions cannot be used because they require one. TypeSafe also requires theTypeSafe-Danger-Zone-Images: trueheader on any request with an image or aBoxquestion, which the connector never sends.Details and proposed scope are in #9410. This PR is opened as a draft so the implementation can be discussed alongside the issue.
Description & Review Guide
Content.from_data(..., media_type="image/...")) is mapped totypesafe_sdk.Imageassets inside the existingmessagesstate.TypeSafe-Danger-Zone-Images: truethrough the SDK'sextra_headersonly when the request contains an image or aBoxquestion. Text-only requests are unchanged (extra_headers=None).Noul+Boxexample.Boxis listed as a supported question type.>=0.7.1,<0.8.0range, already exposesImage,BoxandBoxAnswer.Boxquestion is present (current approach, since the request fails without it), or require an explicit client option.Tests
Imageasset with the opt-in header (stub client).Boxquestion sends the header and theBoxAnsweris available throughresponse.value.Boxquestion alone (SDK object or mapping form, with or without an image) triggers the header.pytest -m "not integration": 95 passed.ruff checkandruff format --checkpass. mypy reports the same 8 pre-existing errors in_tool_calls.pyas onmain, none in the changed file.Related Issue
Fixes #9410
AI Assistance
AI assistance details:
Contribution Checklist