Skip to content

V1.4.0 - #664

Merged
dwash96 merged 36 commits into
mainfrom
v1.4.0
Sep 1, 2026
Merged

V1.4.0#664
dwash96 merged 36 commits into
mainfrom
v1.4.0

Conversation

@dwash96

@dwash96 dwash96 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Addresses:

Includes:

dwash96 and others added 30 commits August 24, 2026 18:15
… same underlying task to prevent MCP library from screaming at us
…t takes potential errors in to account in large folders and in the case of inaccessible network drives
Switch Gemini provider authentication from query parameters (`?key=...`)
to the `x-goog-api-key` HTTP header in alignment with Google Gemini API
guidelines.

- Override `build_headers` in `GeminiProvider` to populate
  `x-goog-api-key` and suppress `Authorization: Bearer`.

- Remove `key` query parameter construction in `gemini_complete` and
  `gemini_stream` domain adapters.

- Add test coverage in `tests/helpers/test_llms_gemini_auth.py`.

Co-authored-by: cecli (gemini/gemini-3.6-flash)
feat(gemini): authenticate using x-goog-api-key header
When using Gemini models a 429 response often includes a retryDelay
in the JSON. This is typically o(10) seconds, sometimes more. cecli
uses a blind backoff computation. This can result in denial of service
when using Gemini models. To correct this, respect the retryDelay
delivered in Gemini model responses.

- Add `_extract_gemini_retry_delay` helper to `Model` class in
  `cecli/models.py` to extract suggested `retryDelay` (in seconds) from
  429 error response payloads.

- Update `send_completion()` and `simple_send_with_retries()` to
  prioritize Gemini's suggested retry delay over blind unilateral
  backoff multipliers when available.

- Add unit tests in `tests/unit/test_gemini_retry_backoff.py` covering
  valid retryDelay extraction, JSON string payloads, non-429 responses,
  and missing details fields.

Co-authored-by: cecli (gemini/gemini-3.6-flash)
Co-authored-by: cecli (gemini/gemini-3.6-flash)
Co-authored-by: cecli (gemini/gemini-3.6-flash)
- extract retry delay via Gemini payload and HTTP headers
- add tests for same

Co-authored-by: cecli (gemini/gemini-3.7-flash)
feat: extract and use retry delay from Gemini 429 error payloads
@dwash96
dwash96 merged commit 1933dd2 into main Sep 1, 2026
13 checks passed
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.

2 participants