Skip to content

Conversation

@prwhelan
Copy link
Member

@prwhelan prwhelan commented Mar 4, 2025

Backporting #123076

We now always retry based on the provider's configured retry logic
rather than the HTTP status code. Some providers (e.g. Cohere,
Anthropic) will return 200 status codes with error bodies, others (e.g.
OpenAI, Azure) will return non-200 status codes with non-streaming
bodies.

Notes:
- Refactored from HttpResult to StreamingHttpResult, the byte body is
  now the streaming element while the http response lives outside the
  stream.
- Refactored StreamingHttpResultPublisher so that it only pushes byte
  body into a queue.
- Tests all now have to wait for the response to be fully consumed
  before closing the service, otherwise the close method will shut down
  the mock web server and apache will throw an error.
@prwhelan prwhelan added >bug :ml Machine learning backport Team:ML Meta label for the ML team auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v9.0.0 v9.0.1 labels Mar 4, 2025
@elasticsearchmachine elasticsearchmachine merged commit 3afe453 into elastic:9.0 Mar 4, 2025
16 checks passed
@prwhelan prwhelan deleted the backport/9.0/123076 branch March 4, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :ml Machine learning Team:ML Meta label for the ML team v9.0.0 v9.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants