fix(vision): respect versioned api bases in openai-compat url join#596
Open
kevinchennewbee wants to merge 1 commit into
Open
fix(vision): respect versioned api bases in openai-compat url join#596kevinchennewbee wants to merge 1 commit into
kevinchennewbee wants to merge 1 commit into
Conversation
apibase like https://ark.cn-beijing.volces.com/api/coding/v3 already carries its version segment; blindly appending /v1/chat/completions 404s on such endpoints. Append only /chat/completions when the base ends with /v<N>. Verified against Volcengine coding-plan endpoint (previously 404, now works).
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.
现象:vision_api 模板的 openai 兼容路径写死
apibase + '/v1/chat/completions',火山 Ark Coding(.../api/coding/v3)这类自带版本号的端点全部 404。修法:base 以
/v<N>结尾时只拼/chat/completions,其余行为不变(+2/−2,单文件)。实测:腾讯云真机,火山 coding 端点此前 404,修后视觉调用正常。