Skip to content

Commit f3eb4d2

Browse files
apply copilot api type earlier in defaults setup
1 parent 667998d commit f3eb4d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/model/provider/provider.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ func applyProviderDefaults(cfg *latest.ModelConfig, customProviders map[string]l
406406
//
407407
// NOTE: max_tokens is NOT set here; see teamloader and runtime/model_switcher.
408408
func applyModelDefaults(cfg *latest.ModelConfig) {
409+
// Set appropriate github copilot api_type.
410+
applyGithubCopilotAPIType(cfg)
411+
409412
// Explicitly disabled → normalise to nil so providers never see it.
410413
if cfg.ThinkingBudget.IsDisabled() {
411414
cfg.ThinkingBudget = nil
@@ -422,9 +425,6 @@ func applyModelDefaults(cfg *latest.ModelConfig) {
422425
return
423426
}
424427

425-
// Set appropriate github copilot api_type.
426-
applyGithubCopilotAPIType(cfg)
427-
428428
// No thinking_budget configured — only thinking-only models get a default.
429429
switch providerType {
430430
case "openai", "openai_chatcompletions", "openai_responses":

0 commit comments

Comments
 (0)