GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: owned_by field in GET /v1/models returns list instead of string by nileshpatil6 · Pull Request #46006 · huggingface/transformers

Conversation

@nileshpatil6

@nileshpatil6 nileshpatil6 commented May 16, 2026

Copy link
Copy Markdown
Contributor

What does this fix?

In ModelManager.get_gen_models(), the owned_by field in the model list response was incorrectly set to a list instead of a string.

# Before (bug): returns a list like ["mistralai", "Mistral-7B-v0.1"]
author = repo.repo_id.split("/") if "/" in repo.repo_id else ""

# After (fix): returns just the author string "mistralai"
author = repo.repo_id.split("/")[0] if "/" in repo.repo_id else ""

str.split("/") returns a list of all segments. Without [0], the owned_by field in the GET /v1/models response contained a Python list (e.g. ["mistralai", "Mistral-7B-v0.1"]) instead of the expected author string ("mistralai"). This breaks OpenAI-compatible clients that parse the models list and expect owned_by to be a string.

Changes

  • src/transformers/cli/serving/model_manager.py: add [0] index to split("/") call so only the author segment is used for owned_by.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nileshpatil6
fix: get_gen_models returns list instead of string for owned_by field
d813a88
repo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
@Rocketknight1

Rocketknight1 commented May 18, 2026

Copy link
Copy Markdown
Member

Not sure if real, and also not sure who to cc 😅

Maybe @SunMarc @LysandreJik?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SunMarc
SunMarc approved these changes May 19, 2026
View reviewed changes

@SunMarc SunMarc left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks ! The issue seems real at least from the code. For serve, you can usually either ping me or Lysandre

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SunMarc
SunMarc enabled auto-merge May 19, 2026 04:50
@SunMarc
SunMarc added this pull request to the merge queue May 19, 2026
@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented May 19, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Merged via the queue into huggingface:main with commit 6b42f33 May 19, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

yuchenxie4645 pushed a commit to yuchenxie4645/transformers that referenced this pull request May 28, 2026
@nileshpatil6 @yuchenxie4645
fix: owned_by field in GET /v1/models returns list instead of string (h…
a3b22f2
…uggingface#46006)

fix: get_gen_models returns list instead of string for owned_by field

repo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
kashif pushed a commit to kashif/transformers that referenced this pull request Jun 1, 2026
@nileshpatil6 @kashif
fix: owned_by field in GET /v1/models returns list instead of string (h…
20d273b
…uggingface#46006)

fix: get_gen_models returns list instead of string for owned_by field

repo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
khushali9 pushed a commit to khushali9/transformers that referenced this pull request Jun 8, 2026
@nileshpatil6 @khushali9
fix: owned_by field in GET /v1/models returns list instead of string (h…
9e98684
…uggingface#46006)

fix: get_gen_models returns list instead of string for owned_by field

repo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
stevhliu pushed a commit to stevhliu/transformers that referenced this pull request Jul 30, 2026
@nileshpatil6 @stevhliu
fix: owned_by field in GET /v1/models returns list instead of string (h…
b98afd3
…uggingface#46006)

fix: get_gen_models returns list instead of string for owned_by field

repo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SunMarc SunMarc SunMarc approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@nileshpatil6 @Rocketknight1 @HuggingFaceDocBuilderDev @SunMarc
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.