Files
CLIProxyAPI/internal/runtime/executor/apply_patch_capability_test.go
Luis Pater 3ebee06516 fix(interactions): bridge apply_patch tool calls in responses translation
- 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
2026-10-02 03:49:51 +08:00

36 lines
1.4 KiB
Go

package executor
import (
"testing"
"github.com/router-for-me/CLIProxyAPI/v8/internal/config"
coreauth "github.com/router-for-me/CLIProxyAPI/v8/sdk/cliproxy/auth"
)
func TestApplyPatchActualExecutors(t *testing.T) {
cfg := &config.Config{}
for _, exec := range []coreauth.ProviderExecutor{
NewOpenAICompatExecutor("arbitrary-plugin-provider", cfg), NewClaudeExecutor(cfg),
NewGeminiExecutor(cfg), NewGeminiInteractionsExecutor(cfg), NewGeminiVertexExecutor(cfg),
NewAntigravityExecutor(cfg), NewAIStudioExecutor(cfg, "aistudio", nil), NewDevinExecutor(cfg),
NewKimiExecutor(cfg), NewCodexExecutor(cfg), NewCodexWebsocketsExecutor(cfg), NewCodexAutoExecutor(cfg),
NewXAIExecutor(cfg), NewXAIWebsocketsExecutor(cfg), NewXAIAutoExecutor(cfg), NewMetaExecutor(cfg),
} {
support, okSupport := exec.(coreauth.ApplyPatchSupport)
if !okSupport || !support.SupportsApplyPatch() {
t.Errorf("%T (%s) does not advertise actual support", exec, exec.Identifier())
}
if scoped, okScoped := exec.(coreauth.APIKeyConfigExecutor); okScoped {
bound := scoped.ForAPIKey()
if bound.Identifier() != exec.Identifier() || !bound.(coreauth.ApplyPatchSupport).SupportsApplyPatch() {
t.Errorf("%T ForAPIKey lost the actual executor contract", exec)
}
}
}
for _, exec := range []coreauth.ApplyPatchSupport{&CodexAutoExecutor{}, &XAIAutoExecutor{}} {
if exec.SupportsApplyPatch() {
t.Errorf("unconfigured %T advertises support", exec)
}
}
}