Commit d18da3c
Add Google Model Garden's Anthropic support to Inference Plugin (#134080)
* Add Google Model Garden Anthropic integration
* Clean up AnthropicChatCompletionStreamingProcessor
* Enhance GoogleVertexAiChatCompletionServiceSettings to support optional parameters based on transport version
* Add extractOptionalUri method and corresponding tests for URI extraction
* Add GoogleModelGardenProvider support to chat completion models and tests
* Enhance AnthropicChatCompletionStreamingProcessor and related classes to support new content block types and improve parsing logic
* Refactor AnthropicChatCompletionResponseHandler to use a custom error parser and add unit tests for response validation
* Add unit tests for AnthropicChatCompletionStreamingProcessor to validate response parsing and error handling
* Add unit tests for GoogleModelGardenAnthropicChatCompletionRequestEntity to validate serialization of user fields
* Add support for Anthropic provider in Google Vertex AI chat completion model and update related tests
* Add changelog
* Refactor switch case in GoogleVertexAiActionCreator to handle null case
* Validate service settings for Google Vertex AI model configuration
* Enhance Anthropic model tests to validate URI handling and provider requirements
* [CI] Auto commit changes from spotless
* Refactor switch case in GoogleVertexAiService to handle null case
* Simplify version check in GoogleVertexAiChatCompletionServiceSettings
* Make GOOGLE provider default for GoogleModelGarden integration
* Update anthropic_version to vertex-2024-10-22 in request entity and tests
* Refactor Google Vertex AI request handling to improve provider management and error handling
* Enhance validation for Google Model Garden settings to ensure required parameters are provided
* Remove uri streamingUri and provider from rate limit grouping hash calculation
* Refactor null and empty checks for projectId, location, and modelId in GoogleVertexAiChatCompletionServiceSettings
* Refactor Google Model Garden integration to include task settings in request entity and enhance validation for max tokens
* Revert "Update anthropic_version to vertex-2024-10-22 in request entity and tests"
This reverts commit 63ea4b8.
* Refactor Google Vertex AI settings to utilize GoogleVertexAiUtils for model garden support checks
* [CI] Update transport version definitions
* Update anthropic_version in tests and enhance validation logic for Google Vertex AI settings
* Update versions
* Enhance task settings validation in GoogleVertexAiChatCompletionModel
* Address comments regarding anthropic version and configuration
* [CI] Update transport version definitions
* Add nullable annotation for maxTokens parameter in GoogleVertexAiChatCompletionTaskSettings
* [CI] Update transport version definitions
* Clarify URI handling logic in GoogleVertexAiChatCompletionModel comments
* Make maxTokens nullable
* [CI] Update transport version definitions
* Fixed unit tests
* [CI] Update transport version definitions
* Fix validation logic for Google Model Garden and Vertex AI settings
* [CI] Update transport version definitions
* Add validation tests for Google Vertex AI and Model Garden settings
* Refactor validation logic for Google Vertex AI and Model Garden settings
* Add comment
* Update Google Vertex AI Task Settings parsing logic and AnthropicChatCompletionStreamingProcessor readability
---------
Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Jonathan Buttner <[email protected]>1 parent 64b8574 commit d18da3c
File tree
30 files changed
+1934
-118
lines changed- docs/changelog
- server/src/main
- java/org/elasticsearch/inference
- resources/transport
- definitions/referable
- upper_bounds
- x-pack/plugin/inference/src
- main/java/org/elasticsearch/xpack/inference/services
- anthropic
- googlevertexai
- action
- completion
- request
- completion
- test/java/org/elasticsearch/xpack/inference
- external/response/streaming
- services
- anthropic
- googlevertexai
- action
- completion
- request/completion
30 files changed
+1934
-118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceUtils.java
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
317 | 329 | | |
318 | 330 | | |
319 | 331 | | |
| |||
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments