Skip to content

fix(api-key): keep raw served model names in invokable model options - #564

Merged
Yuyz0112 merged 1 commit into
mainfrom
fix/invokable-model-raw-name
Nov 26, 2026
Merged

Yuyz0112 merged 1 commit into
mainfrom
fix/invokable-model-raw-name

Conversation

@Yuyz0112

Copy link
Copy Markdown
Contributor

Summary

Fixes NEU-943. invokableModelOptions (added in #512) trimmed the model name from list_invokable_models. An engine that serves " Z " was offered in Allowed Models as Z (value, label and model), a name the gateway does not match. #501 had already fixed the same trim on the other paths with nonBlankModelName; this path now uses it too.

  • invokableModelOptions: keep the raw model name; trim only to skip blank names.
  • Test: " Z " stays as is; "" and " " are dropped.

User-visible changes

Only served model names with leading or trailing whitespace are affected: the Allowed Models candidate now shows and stores the name as the endpoint reports it. Other names are unchanged.

The candidates built from list_invokable_models trimmed the model name, so an engine name with leading or trailing whitespace was offered (and would be stored) as a name the gateway does not match. Use nonBlankModelName as the other model paths do: trim only to skip blank names.

Refs NEU-943
@Yuyz0112
Yuyz0112 merged commit c0cc397 into main Nov 26, 2026
1 check passed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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