修复Azure渠道对responses API的兼容性支持 - 为Azure渠道添加对responses API的特殊处理 - 兼容微软新… - #1205
Conversation
…的API格式,使用preview版本的api-version - 修复了Azure渠道无法正确处理responses请求的问题
WalkthroughA special case was added to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Adaptor
participant RelayCommon
Client->>Adaptor: GetRequestURL(info)
alt info.RelayMode == "responses"
Adaptor->>RelayCommon: GetFullRequestURL("/openai/v1/responses?api-version=preview")
RelayCommon-->>Adaptor: Full URL
Adaptor-->>Client: Return responses endpoint URL
else
Adaptor->>Adaptor: Construct URL as usual
Adaptor-->>Client: Return constructed URL
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)relay/channel/openai/adaptor.go (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
azure 的 responses api 直接配置了带有/v1/responses的地址,好像没有生效,该如何使用呢?或者在配置的时候需要有什么特殊的操作 |
不需要,正常对接az 渠道,就可以 使用 responses api请求了 |
|
再麻烦问一句,我只看了 merged 的代码。看到是如果 baseUrl 中包含了 /v1/responses 的话会自动拼接完整的 responses api地址。然后我用 responses api 的方式来调用,gpt-4.1 正常返回,但是o3-pro的话显示 “Resource not found”, 实际我使用 curl 自己拼接请求o3-pro的调用是能正常返回的,您知道这可能是什么原因么? |
|
|
感谢 可能 azure 权限的问题导致 resource 找不到,但是 curl 能调用通,现在可以了。 |
…s-api 修复Azure渠道对responses API的兼容性支持 - 为Azure渠道添加对responses API的特殊处理 - 兼容微软新…
…的API格式,使用preview版本的api-version - 修复了Azure渠道无法正确处理responses请求的问题
Summary by CodeRabbit