feat: lenient schema validation; unified exception tree; retry config - #424
Open
2ynn wants to merge 4 commits into
Open
feat: lenient schema validation; unified exception tree; retry config#4242ynn wants to merge 4 commits into
2ynn wants to merge 4 commits into
Conversation
2ynn
force-pushed
the
feat/lenientValidation/unifiedExceptions
branch
from
August 19, 2026 19:05
6c34591 to
7ef4549
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exception trees unification
This PR unifies exception trees by:
Google.GenAI.ApiException : HttpRequestExceptionbase exception (root)ClientError/ServerErrorare reparented under the root exceptionAs a result, a single
catch (Google.GenAI.ApiException)now covers every API error:Retries configuration
Client.csmaps the publicHttpOptions.RetryOptions(HttpRetryOptions) onto theembedded gaos SDK's
RetryConfig, so one knob governs both native model calls andinteraction/agent/webhook calls. Fields that don't propagate to gaos fall back to gaos
defaults.
HttpRetryOptionsfieldModels.*maxRetries)jitterFactor0.5)408/409/429/5XX)HttpRetryOptions.HttpStatusCodesis not respected for interaction/agent/webhook calls. Gaos retryable status codes are hardcoded per-operation in the generatedInteractions.csand are only changeable via the spec x-speakeasy-retries.statusCodes. Code sets diverge only on408/409(gaos retries, native does not) and501(gaos5XXvs native's explicit500/502/503/504).Lenient schema validation
Additionally, lenient schema validation was enabled (
csharp.schemaValidation: lenient), meaning typed models are constructed without raising: