Skip to content

Commit 316a836

Browse files
committed
Fix code and tests :-)
Signed-off-by: David Gageot <[email protected]>
1 parent 591f620 commit 316a836

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ tasks:
5353

5454
test:
5555
desc: Run tests
56-
cmd: OPENAI_API_KEY= ANTHROPIC_API_KEY= GOOGLE_API_KEY= MISTRAL_API_KEY= go test {{.CLI_ARGS}} ./...
56+
cmd: OPENAI_API_KEY= ANTHROPIC_API_KEY= GOOGLE_API_KEY= MISTRAL_API_KEY= GITHUB_TOKEN= go test {{.CLI_ARGS}} ./...
5757

5858
build-local:
5959
desc: Build binaries for local host platform

examples/podcastgenerator_githubmodel.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ agents:
6262
models:
6363
github-model:
6464
provider: openai
65-
model: openai/gpt-5
65+
model: gpt-5
6666
base_url: https://models.github.ai/inference
67-
token_Key: ${GITHUB_TOKEN}
67+
token_key: GITHUB_TOKEN

pkg/config/gather.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ func GatherEnvVarsForModels(cfg *latest.Config) []string {
5555
for modelName := range modelNames {
5656
model := cfg.Models[modelName]
5757

58-
// Use the token environment variable from the alias if available
59-
if alias, exists := provider.Aliases[model.Provider]; exists {
58+
if model.TokenKey != "" {
59+
requiredEnv[model.TokenKey] = true
60+
} else if alias, exists := provider.Aliases[model.Provider]; exists {
61+
// Use the token environment variable from the alias if available
6062
if alias.TokenEnvVar != "" {
6163
requiredEnv[alias.TokenEnvVar] = true
6264
}

0 commit comments

Comments
 (0)