Skip to content

Commit 39c567a

Browse files
Merge pull request #108 from JimStenstrom/feat/github-models-provider
feat: add GitHub Models as a provider
2 parents 3a2f87a + 5ebca86 commit 39c567a

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

agents.config.example.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
"apiKey": "your-openrouter-api-key-here",
88
"models": ["openai/gpt-4o-mini", "anthropic/claude-3-haiku"]
99
},
10+
{
11+
"name": "GitHub Models",
12+
"baseUrl": "https://models.github.ai/inference",
13+
"apiKey": "your-github-token-here",
14+
"models": ["openai/gpt-4o-mini", "openai/gpt-4o"]
15+
},
1016
{
1117
"name": "Local Ollama",
1218
"baseUrl": "http://localhost:11434/v1",

source/wizard/templates/provider-templates.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,38 @@ export const PROVIDER_TEMPLATES: ProviderTemplate[] = [
296296
.filter(Boolean),
297297
}),
298298
},
299+
{
300+
id: 'github-models',
301+
name: 'GitHub Models',
302+
fields: [
303+
{
304+
name: 'apiKey',
305+
prompt: 'GitHub Token (PAT with models:read scope)',
306+
required: true,
307+
sensitive: true,
308+
},
309+
{
310+
name: 'model',
311+
prompt: 'Model name(s) (comma-separated)',
312+
default: 'openai/gpt-4o-mini',
313+
required: true,
314+
},
315+
{
316+
name: 'providerName',
317+
prompt: 'Provider name',
318+
default: 'GitHub Models',
319+
},
320+
],
321+
buildConfig: answers => ({
322+
name: answers.providerName || 'GitHub Models',
323+
baseUrl: 'https://models.github.ai/inference',
324+
apiKey: answers.apiKey,
325+
models: answers.model
326+
.split(',')
327+
.map(m => m.trim())
328+
.filter(Boolean),
329+
}),
330+
},
299331
{
300332
id: 'custom',
301333
name: 'Custom Provider',

0 commit comments

Comments
 (0)