feat: add force_append_path parameter to http_options#1701
Open
what-is-thy-bidding wants to merge 16 commits intogoogleapis:mainfrom
Open
feat: add force_append_path parameter to http_options#1701what-is-thy-bidding wants to merge 16 commits intogoogleapis:mainfrom
what-is-thy-bidding wants to merge 16 commits intogoogleapis:mainfrom
Conversation
Author
|
@sasha-gitg : can you please have a look at this solution to my 404 error? |
Collaborator
|
Hi @what-is-thy-bidding |
Author
|
@janasangeetha : Thanks for reaching back. Please let me know incase more info is needed form me. |
sasha-gitg
approved these changes
Nov 19, 2025
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.
feat: Add force_append_path parameter to http_options for explicit URL control
Add new
force_append_pathparameter tohttp_optionsthat gives users explicitcontrol over whether API paths are appended to custom base URLs. This solves
404 errors when using custom base URLs with API gateway proxies.
Problem:
When using custom base URLs (e.g., API gateway proxies) with Bearer token
authentication, the SDK wasn't appending model-specific API paths, resulting
in 404 errors. Users had to resort to workarounds like setting dummy api_key
values.
Solution:
The new
force_append_pathparameter provides three options:Changes:
force_append_path: Optional[bool]field to HttpOptions (types.py)force_append_path: Optional[bool]field to HttpOptionsDict (types.py)Example usage:
Benefits:
Files modified:
Breaking changes: None
Backward compatible: Yes