mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-09 09:29:17 +08:00
- Add `codex.orphan-delegation-compatibility` configuration option and mirror it to SDK configuration. - Convert orphan Codex delegation outputs into standard user messages for requests with `X-Openai-Subagent: collab_spawn`. - Integrate orphan delegation rewriting into OpenAI responses request handling pipeline. Closes: #5401
26 lines
753 B
Go
26 lines
753 B
Go
package api
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/router-for-me/CLIProxyAPI/v7/internal/config"
|
|
)
|
|
|
|
func TestEffectiveSDKConfigCopiesCodexOptimizeMultiAgentV2(t *testing.T) {
|
|
cfg := &config.Config{Codex: config.CodexConfig{OptimizeMultiAgentV2: true}}
|
|
|
|
sdkCfg := effectiveSDKConfig(cfg)
|
|
if sdkCfg == nil || !sdkCfg.CodexOptimizeMultiAgentV2 {
|
|
t.Fatalf("CodexOptimizeMultiAgentV2 = false, want true")
|
|
}
|
|
}
|
|
|
|
func TestEffectiveSDKConfigCopiesCodexOrphanDelegationCompatibility(t *testing.T) {
|
|
cfg := &config.Config{Codex: config.CodexConfig{OrphanDelegationCompatibility: true}}
|
|
|
|
sdkCfg := effectiveSDKConfig(cfg)
|
|
if sdkCfg == nil || !sdkCfg.CodexOrphanDelegationCompatibility {
|
|
t.Fatalf("CodexOrphanDelegationCompatibility = false, want true")
|
|
}
|
|
}
|