Skip to content

[Inference API] Display name and model_creator in endpoint metadata#144124

Merged
dimitris-athanasiou merged 3 commits intoelastic:mainfrom
dimitris-athanasiou:display-name-and-model_creator-in-endpoint-metadata
Mar 13, 2026
Merged

[Inference API] Display name and model_creator in endpoint metadata#144124
dimitris-athanasiou merged 3 commits intoelastic:mainfrom
dimitris-athanasiou:display-name-and-model_creator-in-endpoint-metadata

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor

This commit aligns EIS authorization endpoint parsing with the new format that contains:

{
  ...,
  "display": {
    "name": "My Model",
    "model_creator": "My Model Creator"
  }
}

and modifies EndpointMetadata.Display to accommodate the new model_creator field.

This commit aligns EIS authorization endpoint parsing with the new format
that contains:

```
{
  ...,
  "display": {
    "name": "My Model",
    "model_creator": "My Model Creator"
  }
}
```

and modifies `EndpointMetadata.Display` to accommodate the new `model_creator` field.
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/search-inference-team (Team:Search - Inference)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: b38a1f97-d440-4dd0-b2d3-5f85c75a6be9

📥 Commits

Reviewing files that changed from the base of the PR and between 00b318f and 15151e1.

📒 Files selected for processing (1)
  • server/src/test/java/org/elasticsearch/inference/MinimalServiceSettingsTests.java

📝 Walkthrough

Walkthrough

This PR adds a nullable modelCreator field to EndpointMetadata.Display, updates its parsing, serialization, transport-version gating, and tests to handle the new field, and introduces Display.EMPTY_INSTANCE. ModelConfigurations now exposes a nullable getEndpointMetadata() plus a non-null-safe getEndpointMetadataOrEmpty(). Call sites are updated to use the appropriate accessor. The endpoint schema version is bumped to 1, and response/authorization types and tests are adjusted to carry EndpointMetadata.Display objects instead of plain display-name strings.

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@server/src/test/java/org/elasticsearch/inference/MinimalServiceSettingsTests.java`:
- Line 66: The expected JSON constant
MINIMAL_SERVICE_SETTINGS_WITH_METADATA_JSON is missing the emitted
display.model_creator field because the test now constructs
EndpointMetadata.Display("name", "creator"); update
MINIMAL_SERVICE_SETTINGS_WITH_METADATA_JSON to include "display": {"name":
"<expected>", "model_creator": "creator"} (or the appropriate ordering/format
used by MinimalServiceSettings.toXContent) so
testToXContentMinimalServiceSettingsWithEndpointMetadata matches the output of
MinimalServiceSettings.toXContent when given EndpointMetadata.Display; locate
the JSON constant and adjust the display object to contain model_creator
alongside name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 8f3f81fc-a9ec-4333-8963-996c78453446

📥 Commits

Reviewing files that changed from the base of the PR and between b44757b and 00b318f.

⛔ Files ignored due to path filters (2)
  • server/src/main/resources/transport/definitions/referable/inference_endpoint_metadata_display_model_creator_added.csv is excluded by !**/*.csv
  • server/src/main/resources/transport/upper_bounds/9.4.csv is excluded by !**/*.csv
📒 Files selected for processing (15)
  • server/src/main/java/org/elasticsearch/inference/MinimalServiceSettings.java
  • server/src/main/java/org/elasticsearch/inference/ModelConfigurations.java
  • server/src/main/java/org/elasticsearch/inference/metadata/EndpointMetadata.java
  • server/src/test/java/org/elasticsearch/inference/EndpointMetadataTests.java
  • server/src/test/java/org/elasticsearch/inference/MinimalServiceSettingsTests.java
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/parser/EndpointMetadataParser.java
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/AuthorizationPoller.java
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationModel.java
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/EndpointSchemaMigration.java
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/response/ElasticInferenceServiceAuthorizationResponseEntity.java
  • x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/ModelConfigurationsTests.java
  • x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/parser/EndpointMetadataParserTests.java
  • x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/authorization/AuthorizationPollerTests.java
  • x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationModelTests.java
  • x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/response/ElasticInferenceServiceAuthorizationResponseEntityTests.java

Copy link
Copy Markdown
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

Great work!

* response.
*/
public static final Long ENDPOINT_SCHEMA_VERSION = 0L;
public static final Long ENDPOINT_SCHEMA_VERSION = 1L;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think coderabbit is saying this one might need the model_creator field?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep! Added a fix: 15151e1

return builder;
}

@Override
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you 🙏

@dimitris-athanasiou dimitris-athanasiou merged commit 0e409a4 into elastic:main Mar 13, 2026
36 checks passed
@dimitris-athanasiou dimitris-athanasiou deleted the display-name-and-model_creator-in-endpoint-metadata branch March 13, 2026 13:03
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
…lastic#144124)

This commit aligns EIS authorization endpoint parsing with the new format
that contains:

```
{
  ...,
  "display": {
    "name": "My Model",
    "model_creator": "My Model Creator"
  }
}
```

and modifies `EndpointMetadata.Display` to accommodate the new `model_creator` field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants