| 165 | } |
| 166 | |
| 167 | func (i *interceptionBase) disableParallelToolCalls() { |
| 168 | // Note: Parallel tool calls are disabled to avoid tool_use/tool_result block mismatches. |
| 169 | // https://github.com/coder/aibridge/issues/2 |
| 170 | updated, err := i.reqPayload.disableParallelToolCalls() |
| 171 | if err != nil { |
| 172 | i.logger.Warn(context.Background(), "failed to set tool_choice in request payload", slog.Error(err)) |
| 173 | return |
| 174 | } |
| 175 | i.reqPayload = updated |
| 176 | } |
| 177 | |
| 178 | // extractModelThoughts returns any thinking blocks that were returned in the response. |
| 179 | func (*interceptionBase) extractModelThoughts(msg *anthropic.Message) []*recorder.ModelThoughtRecord { |