mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-16 22:57:53 +08:00
- Handle apply_patch custom tool call streaming deltas and snapshots for Responses API translation - Track and resolve step indexes, function call identities, and error states across stream events - Propagate apply_patch tool input errors and upstream failure states in stream and non-stream responses
26 lines
696 B
Go
26 lines
696 B
Go
package auth
|
|
|
|
// ApplyPatchSupport optionally advertises the actual executor's tool contract.
|
|
// It does not change ProviderExecutor or the plugin ABI.
|
|
type ApplyPatchSupport interface {
|
|
SupportsApplyPatch() bool
|
|
}
|
|
|
|
// SupportsApplyPatchForProviders requires support from every routing candidate.
|
|
func (m *Manager) SupportsApplyPatchForProviders(providers []string) bool {
|
|
if m == nil || len(providers) == 0 {
|
|
return false
|
|
}
|
|
for _, provider := range providers {
|
|
executor, okExecutor := m.Executor(provider)
|
|
if !okExecutor {
|
|
return false
|
|
}
|
|
support, okSupport := executor.(ApplyPatchSupport)
|
|
if !okSupport || !support.SupportsApplyPatch() {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|