Update internal execution fixtures for identified resources

This commit is contained in:
2026-11-02 12:51:26 +00:00
parent 6b8eefd18b
commit 3e67743fbf
4 changed files with 33 additions and 21 deletions

View File

@@ -318,8 +318,8 @@ func newSmokeSelectionRunner(t *testing.T) (*Runner, *selectionTestCollaborators
func smokeSelectionConfig() map[string]any {
return map[string]any{
"backends": map[string]any{
"alpha": map[string]any{
"backends": []any{
map[string]any{"id": "alpha",
"endpoint": "https://alpha.example/v1",
"smoke_tests": map[string]any{
"default_profile": "cross-backend-profile",
@@ -327,29 +327,28 @@ func smokeSelectionConfig() map[string]any {
"authentication": map[string]any{"kind": "openrouter_key"},
},
},
"beta": map[string]any{
map[string]any{"id": "beta",
"endpoint": "https://beta.example/v1",
"smoke_tests": map[string]any{"authentication": map[string]any{"kind": "openrouter_key"}},
},
"delta": map[string]any{
map[string]any{"id": "delta",
"endpoint": "https://delta.example/v1",
"smoke_tests": map[string]any{"default_profile": "not-yet-defined"},
},
"epsilon": map[string]any{
map[string]any{"id": "epsilon",
"endpoint": "https://epsilon.example/v1",
"smoke_tests": map[string]any{"default_profile": "endpoint-profile"},
},
},
"profiles": map[string]any{
"alpha-profile": map[string]any{"backend": "alpha", "model": "alpha-model"},
"prompt-profile": map[string]any{"backend": "beta", "model": "prompt-model"},
"cross-backend-profile": map[string]any{"backend": "beta", "model": "cross-model"},
"endpoint-profile": map[string]any{"endpoint": "https://endpoint-only.example/v1", "model": "endpoint-model"},
"incomplete-profile": map[string]any{"backend": "alpha"},
"profiles": []any{
map[string]any{"id": "alpha-profile", "backend": "alpha", "model": "alpha-model"},
map[string]any{"id": "prompt-profile", "backend": "beta", "model": "prompt-model"},
map[string]any{"id": "cross-backend-profile", "backend": "beta", "model": "cross-model"},
map[string]any{"id": "endpoint-profile", "endpoint": "https://endpoint-only.example/v1", "model": "endpoint-model"},
map[string]any{"id": "incomplete-profile", "backend": "alpha"},
},
"prompts": map[string]any{
"selection.prompt": map[string]any{
"version": "v1",
"prompts": []any{
map[string]any{"id": "selection.prompt",
"default_profile": "prompt-profile",
"inputs": []any{map[string]any{"name": "required_input", "required": true}},
"messages": []any{map[string]any{"role": "user", "content": "Hello {{.required_input}}"}},
@@ -358,8 +357,7 @@ func smokeSelectionConfig() map[string]any {
"format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json",
},
},
"backend.prompt": map[string]any{
"version": "v1",
map[string]any{"id": "backend.prompt",
"messages": []any{map[string]any{"role": "user", "content": "Hello"}},
"output": map[string]any{
"format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json",
@@ -368,3 +366,13 @@ func smokeSelectionConfig() map[string]any {
},
}
}
func smokeSelectionBackend(values map[string]any, id string) map[string]any {
for _, item := range values["backends"].([]any) {
backend := item.(map[string]any)
if backend["id"] == id {
return backend
}
}
return nil
}