Skip to content

fix: detect context length errors in GCP Vertex AI provider#6976

Merged
jh-block merged 1 commit intoblock:mainfrom
rabi:vertex_compaction
Feb 5, 2026
Merged

fix: detect context length errors in GCP Vertex AI provider#6976
jh-block merged 1 commit intoblock:mainfrom
rabi:vertex_compaction

Conversation

@rabi
Copy link
Contributor

@rabi rabi commented Feb 5, 2026

Summary

Use map_http_error_to_provider_error for proper error classification, enabling recovery compaction when context limit is exceeded.

Otherwise we get the follwing error and forced to start a new session.

Ran into this error trying to compact: Request failed: Request failed with status 413 Payload Too Large: {"type":"error","error":{"type":"invalid_request_error","message":"Prompt is too long"},"request_id":"req_vrtx_011CXnThejoLK3fcwz1vFZ5C"}.

Please try again or create a new session

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Tested locally.

Use map_http_error_to_provider_error for proper error classification,
enabling recovery compaction when context limit is exceeded.

Signed-off-by: rabi <ramishra@redhat.com>
@rabi rabi force-pushed the vertex_compaction branch from 2ff8f08 to af42e26 Compare February 5, 2026 10:40
Copy link
Collaborator

@jh-block jh-block left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@jh-block jh-block added this pull request to the merge queue Feb 5, 2026
Merged via the queue into block:main with commit d1b6053 Feb 5, 2026
18 checks passed
tlongwell-block added a commit that referenced this pull request Feb 5, 2026
* origin/main:
  fix: detect context length errors in GCP Vertex AI provider (#6976)
  Added the ability to escape Jinja variables in recipes to include them in prompts (#6975)
  Bug Fix: bump pctx (#6967)
  fix(acp): fixtures now raise content mismatch errors (#6912)
  custom provider form minor improvements (#6966)
  Fix 'Edit In Place' feature appending instead of editing messages (#6955)
  docs: change RPI slash commands (#6963)
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 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.

2 participants