Skip to content

Add model context capabilities to Python#564

Open
bmehta001 wants to merge 1 commit intomainfrom
bhamehta/add-model-context-capabilities-python
Open

Add model context capabilities to Python#564
bmehta001 wants to merge 1 commit intomainfrom
bhamehta/add-model-context-capabilities-python

Conversation

@bmehta001
Copy link
Copy Markdown
Contributor

Python SDK: add contextLength, inputModalities, outputModalities, capabilities; also added tests for these fields

Added a test for modelVariant as well

Python SDK: add contextLength, inputModalities, outputModalities, capabilities; also added tests
Copilot AI review requested due to automatic review settings March 30, 2026 16:52
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment Mar 30, 2026 4:52pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the Python SDK’s model metadata surface area to include additional “capability” fields (context length, modalities, capabilities, tool-calling support) and adds tests to ensure these new properties are exposed consistently on both Model and ModelVariant.

Changes:

  • Add context_length, input_modalities, output_modalities, capabilities, and supports_tool_calling to the Python IModel interface and implement them in Model / ModelVariant.
  • Extend ModelInfo (Pydantic model) to parse the new metadata fields from get_model_list.
  • Add Python tests validating the new properties are present and forwarded correctly (including via selected_variant).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/python/test/test_model.py Adds tests asserting the new metadata properties exist on Model and match the selected ModelVariant.
sdk/python/src/model_variant.py Exposes new metadata properties by forwarding from ModelInfo.
sdk/python/src/model.py Exposes new metadata properties by delegating to the selected variant.
sdk/python/src/imodel.py Extends the IModel ABC with the new metadata properties.
sdk/python/src/detail/model_data_types.py Adds the new fields to ModelInfo with the expected JSON aliases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bmehta001 bmehta001 requested a review from prathikr March 30, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants