Skip to content

Upstream pull#160

Merged
Sandeep-BA merged 10 commits into
redbus-labs:mainfrom
google:main
May 19, 2026
Merged

Upstream pull#160
Sandeep-BA merged 10 commits into
redbus-labs:mainfrom
google:main

Conversation

@Sandeep-BA
Copy link
Copy Markdown
Collaborator

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • Closes: #issue_number
  • Related: #issue_number

2. Or, if no issue exists, describe the change:

If applicable, please follow the issue templates to provide as much detail as
possible.

Problem:
A clear and concise description of what the problem is.

Solution:
A clear and concise description of what you want to happen and why you choose
this solution.

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed java test results.

Manual End-to-End (E2E) Tests:

Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My pull request contains a single commit.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

Add any other context or screenshots about the feature request here.

carlossg and others added 10 commits May 12, 2026 22:03
Mockito 5.20.0 and JaCoCo 0.8.12 both bundle an ASM version that does
not recognize Java 25 class file format (major version 69), causing
IllegalArgumentException at test time. Upgrading to versions released
after Java 25 GA resolves the issue.

- mockito: 5.20.0 → 5.23.0
- jacoco-maven-plugin: 0.8.12 → 0.8.14
Bumps the maven group with 1 update in the / directory: [org.apache.httpcomponents.client5:httpclient5](https://github.com/apache/httpcomponents-client).


Updates `org.apache.httpcomponents.client5:httpclient5` from 5.6 to 5.6.1
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.6.1/RELEASE_NOTES.txt)
- [Commits](apache/httpcomponents-client@rel/v5.6...rel/v5.6.1)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5
  dependency-version: 5.6.1
  dependency-type: direct:production
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
…uests

This is part of a larger chain of commits for adding chat completion API support to the Apigee model.

The HTTP client wraps payload construction (delegating to ChatCompletionsRequest.fromLlmRequest) and response parsing (delegating to ChatCompletionsResponse.ChatCompletion / ChatCompletionChunkCollection) for both non-streaming and streaming Server-Sent Events responses.
END_PUBLIC

Key behaviors:

- Tri-state call timeout policy:
  * httpOptions == null OR timeout() empty: applies a default 5-minute call
    timeout to prevent indefinite hangs in the common unconfigured case.
  * httpOptions.timeout() == 0: respected as the explicit caller opt-in to
    infinite hang for long-running streams or batch jobs.
  * httpOptions.timeout() > 0: applied directly as the call timeout.
  This default intentionally diverges from the GenAI HttpOptions convention
  (which treats unset as infinite) as a defensive measure since this client
  does not yet have HTTP retry support.

- SSE prefix handling accepts both "data: foo" (with space) and "data:foo"
  (without space) per the SSE spec, matching providers that omit the
  trailing space.

- A single malformed JSON chunk in a streaming response is logged and
  skipped rather than aborting the entire stream. IOException
  (connection-level) still propagates as a stream error.

- Content-Type is defensively forced to application/json by replacing
  rather than appending, preventing duplicate or conflicting headers if a
  caller supplies their own Content-Type.

- Headers parameter accepts null (treated as no extra headers) and is
  stored as an ImmutableMap for thread-safe reuse across concurrent
  generateContent calls.

Test additions (16 total, +12 new):
- HTTP error status (4xx/5xx) propagation for both streaming and
  non-streaming.
- Empty body propagation.
- Streaming continues past a single malformed chunk.
- SSE "data:" prefix accepted with or without trailing space.
- Custom headers reach the wire.
- Caller-supplied Content-Type is overridden, not appended.
- baseUrl with and without trailing slash.
- Constructor tri-state timeout (null, zero=infinite, positive).
- Constructor null headers parameter.
All testSubscriber.await() calls bounded to 500ms to prevent test hangs.

PiperOrigin-RevId: 915109034
…reserving carried metadata

PiperOrigin-RevId: 917743448
@Sandeep-BA Sandeep-BA merged commit 3ebbc5d into redbus-labs:main May 19, 2026
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.

5 participants