Skip to content

feat(model-profiles): add input/output MIME type fields to ModelProfile#37351

Draft
open-swe[bot] wants to merge 1 commit into
masterfrom
open-swe/profile-mime-types
Draft

feat(model-profiles): add input/output MIME type fields to ModelProfile#37351
open-swe[bot] wants to merge 1 commit into
masterfrom
open-swe/profile-mime-types

Conversation

@open-swe
Copy link
Copy Markdown
Contributor

@open-swe open-swe Bot commented May 11, 2026

Adds informational input_mime_types and output_mime_types dict fields to ModelProfile, keyed by models.dev modality names ('image', 'audio', 'pdf', 'video'). Values are lists of IANA media types (e.g. 'image/png'). Both are informational — presence implies a known-good MIME type, but absence is not a guarantee of rejection.

The CLI in langchain-model-profiles previously used isinstance(value, dict) under [overrides] to decide "is this a provider-level field or a model id?". That heuristic breaks once a provider-level field's value is itself a TOML table (as the new MIME maps are). The loader now dispatches against the declared ModelProfile field names: keys matching declared fields are provider-level; anything else is treated as a model id.

profile_augmentations.toml for anthropic, openai, and perplexity is backfilled with documented MIME types, and the generated _profiles.py for each is regenerated via the refresh CLI.

Release Note

Added input_mime_types and output_mime_types fields to model profiles for OpenAI, Anthropic, and Perplexity integrations.

Disclaimer: opened collaboratively by Mason Daugherty and open-swe.

Opened collaboratively by Mason Daugherty and open-swe.

Adds informational input_mime_types and output_mime_types dict fields
to ModelProfile, keyed by models.dev modality names ('image', 'audio',
'pdf', 'video'). Augments the CLI to dispatch provider-level vs
model-level overrides by ModelProfile field name so non-scalar
provider-level fields (like the new MIME maps) are routed correctly.

Backfills anthropic, openai, and perplexity profile_augmentations.toml
with documented MIME types and regenerates their _profiles.py.

Co-authored-by: Mason Daugherty <61371264+mdrxy@users.noreply.github.com>
@github-actions github-actions Bot added anthropic `langchain-anthropic` package issues & PRs core `langchain-core` package issues & PRs feature For PRs that implement a new feature; NOT A FEATURE REQUEST integration PR made that is related to a provider partner package integration internal model-profiles `langchain-model-profiles` package issues & PRs openai `langchain-openai` package issues & PRs perplexity `langchain-perplexity` package issues & PRs size: XL 1000+ LOC labels May 11, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 11, 2026

Merging this PR will not alter performance

✅ 13 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing open-swe/profile-mime-types (988ee53) with master (2086b91)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on master (bbd10fe) during the generation of this report, so 2086b91 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

anthropic `langchain-anthropic` package issues & PRs core `langchain-core` package issues & PRs feature For PRs that implement a new feature; NOT A FEATURE REQUEST integration PR made that is related to a provider partner package integration internal model-profiles `langchain-model-profiles` package issues & PRs openai `langchain-openai` package issues & PRs perplexity `langchain-perplexity` package issues & PRs size: XL 1000+ LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant