Skip to content

fix(cli): read root-level provider and base_url from config.yaml into model config#2283

Closed
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/config-root-provider-base-url-ignored
Closed

fix(cli): read root-level provider and base_url from config.yaml into model config#2283
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/config-root-provider-base-url-ignored

Conversation

@ygd58

@ygd58 ygd58 commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #2281

Root Cause

When users write root-level provider and base_url in config.yaml:

model: kimi-k2.5:cloud
provider: custom
base_url: http://localhost:11434/v1

These root-level keys were never merged into defaults["model"] in load_cli_config(). Only dict-format model configs were handled. The provider/base_url were silently ignored, causing fallback to OpenRouter.

Fix

After handling the model key, also check for root-level provider and base_url and merge them into defaults["model"].

teknium1 added a commit that referenced this pull request Mar 26, 2026
… model config

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR #2283 by ygd58. Fixes #2281.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #3112. Cherry-picked with authorship preserved. Thanks @ygd58!

teknium1 added a commit that referenced this pull request Mar 26, 2026
… model config (#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR #2283 by ygd58. Fixes #2281.
@teknium1 teknium1 closed this Mar 26, 2026
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
… model config (NousResearch#3112)

When users write root-level provider and base_url in config.yaml
(instead of nesting under model:), these keys were never merged into
defaults['model']. The CLI reads them from CLI_CONFIG['model']['provider']
so root-level keys were silently ignored, causing fallback to OpenRouter.

Merge root-level provider and base_url into defaults['model'] after
handling the model key, so custom/local provider configs work regardless
of nesting.

Cherry-picked from PR NousResearch#2283 by ygd58. Fixes NousResearch#2281.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: config.yaml provider/base_url ignored on fresh session startup

2 participants