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