[Inference API] Display name and model_creator in endpoint metadata#144124
Conversation
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.
|
Pinging @elastic/search-inference-team (Team:Search - Inference) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a nullable Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
server/src/main/resources/transport/definitions/referable/inference_endpoint_metadata_display_model_creator_added.csvis excluded by!**/*.csvserver/src/main/resources/transport/upper_bounds/9.4.csvis excluded by!**/*.csv
📒 Files selected for processing (15)
server/src/main/java/org/elasticsearch/inference/MinimalServiceSettings.javaserver/src/main/java/org/elasticsearch/inference/ModelConfigurations.javaserver/src/main/java/org/elasticsearch/inference/metadata/EndpointMetadata.javaserver/src/test/java/org/elasticsearch/inference/EndpointMetadataTests.javaserver/src/test/java/org/elasticsearch/inference/MinimalServiceSettingsTests.javax-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/parser/EndpointMetadataParser.javax-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/AuthorizationPoller.javax-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationModel.javax-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/authorization/EndpointSchemaMigration.javax-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/response/ElasticInferenceServiceAuthorizationResponseEntity.javax-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/ModelConfigurationsTests.javax-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/parser/EndpointMetadataParserTests.javax-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/authorization/AuthorizationPollerTests.javax-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationModelTests.javax-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/response/ElasticInferenceServiceAuthorizationResponseEntityTests.java
server/src/test/java/org/elasticsearch/inference/MinimalServiceSettingsTests.java
Show resolved
Hide resolved
| * response. | ||
| */ | ||
| public static final Long ENDPOINT_SCHEMA_VERSION = 0L; | ||
| public static final Long ENDPOINT_SCHEMA_VERSION = 1L; |
There was a problem hiding this comment.
I think coderabbit is saying this one might need the model_creator field?
| return builder; | ||
| } | ||
|
|
||
| @Override |
…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.
This commit aligns EIS authorization endpoint parsing with the new format that contains:
and modifies
EndpointMetadata.Displayto accommodate the newmodel_creatorfield.