0xPlaygrounds / 0xPlaygrounds/rig
OpenAI Responses decoder rejects object-shaped top_p from MiniMax
- 主要語言
- Rust
- 星號
- 8.6k
- 分支
- 959
- 平均合併
- 4 小時 32 分鐘
- 30 天內合併 PR
- 117
描述
## Problem
Rig 0.41.0 fails to deserialize some successful MiniMax Responses API responses with:
```text
CompletionError: JsonError: invalid type: map, expected f64
```
The response contains a valid tool call, but deserialization fails before the tool call is exposed to the agent. The error is observed in non-streaming `CompletionModel::completion` responses used by structured-output tasks. The only response-wire field in the Responses decoder that expects `f64` at this layer is `top_p` (`Option` in `CompletionResponseWire` via flattened `AdditionalParameters`).
MiniMax supports the Responses API and structured tool calls; the failure appears to be a provider response-shape compatibility issue rather than unsupported tools. The same model can successfully complete the task through the streaming path.
## Environment
- Rig: 0.41.0
- Provider: MiniMax OpenAI-compatible Responses API
- Model: MiniMax-M3
- Task: single strict structured capture tool
## Expected
A response with a valid tool call should be parsed and delivered to the tool/hook even when optional provider metadata uses a compatible object shape.
## Possible fixes
- Make `top_p` response deserialization tolerant of provider object/null shapes or ignore it on response decoding.
- Normalize MiniMax-compatible response metadata before deserialization.
- Document that the streaming path is required for providers with this response dialect.
I can provide a sanitized raw response body if needed.
貢獻指南
研究方向
Look at the `CompletionResponseWire` struct and its `AdditionalParameters` flattening, focusing on the `top_p` field deserialization. The error indicates a map/object is received where an f64 is expected. Examine the MiniMax provider response shape and the streaming path that works. Start by adding debug logging or a test with a sample response to see the exact JSON structure. The fix likely involves making the deserialization more tolerant in the relevant decoder module.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust
- 領域
- ai-infra-agents
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 活躍
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100