Update examples and benchmarks for identified resources

This commit is contained in:
2026-11-02 12:56:05 +00:00
parent 130c4cc447
commit 0eee3ec962
17 changed files with 93 additions and 76 deletions

View File

@@ -38,10 +38,11 @@ func TestProfileEnvironmentLookupAcceptsNonShellNames(t *testing.T) {
}
cfg := simpleConfig("hello")
cfg.Sources.Underlays = []configkit.Underlay{{Inputs: []configkit.Input{*cfg.Sources.Main}}}
endpoint, model := "http://example.test/v1", "model"
lowerName := name
cfg.Sources.Underlays = append(cfg.Sources.Underlays, configkit.Underlay{Inputs: []configkit.Input{{
Source: promptkit.ProfileSource("default credentials", []promptkit.ProfileConfig{
{ID: "profile", APIKeyEnv: &lowerName},
{ID: "profile", Endpoint: &endpoint, Model: &model, APIKeyEnv: &lowerName},
}),
}}})
env := " " + name + " "
@@ -49,7 +50,7 @@ func TestProfileEnvironmentLookupAcceptsNonShellNames(t *testing.T) {
env = ""
}
cfg.Sources.Main = &configkit.Input{Source: promptkit.ProfileSource("credentials", []promptkit.ProfileConfig{
{ID: "profile", APIKeyEnv: &env},
{ID: "profile", Endpoint: &endpoint, Model: &model, APIKeyEnv: &env},
})}
var calls int
var auth string