Skip to content

fix(config): gateway provider and per-task AI settings from the CLI and environment - #563

Merged
dan-petty merged 1 commit into
release/v0.2.23from
fix/456-gateway-task-settings
Sep 25, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
fix/456-gateway-task-settings

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #456.

Problem

Routing a task to the LiteLLM gateway (provider: gateway, model devops-coder) was only possible by editing config.yaml:

  1. devops ai config --provider gateway was rejected, because gateway was missing from its provider list.
  2. devops config set ai.tasks.chat.model devops-coder failed, because dotted_set only handled two-level keys.
  3. DEVOPS_CLI_AI_TASK_CHAT_* overrides hit the same error, which _apply_env_overrides swallowed, so they were silently dropped.

Changes

  • devops ai config:
    • accepts gateway;
    • a new --task option (chat, metadata, analysis, verification, compose, embedding) sets provider, model, URLs, parallelism, API base and retries for that task alone;
    • --task with no other option shows that task's overrides.
  • dotted_set:
    • walks keys of any depth;
    • coerces an unset field by its declared type (e.g. context_window to an integer, ollama_urls to a list);
    • raises on a key that names no field.
  • Environment overrides now apply. One that can't be applied raises a configuration error naming the variable, instead of being dropped.
  • CLI docs regenerated.

Test plan

  • tests/test_ai_task_settings_paths.py (7 tests):
    • each of the three paths sets a gateway chat task;
    • --provider gateway;
    • an unknown task;
    • typed nested values;
    • unknown nested keys;
    • a failing environment override.
  • Existing config and settings tests pass (247)
  • uv run devops ci --force: all 13 gates pass

…nd environment

Routing a task to the gateway took an edit of config.yaml:
- `devops ai config` rejected `gateway`;
- `devops config set` handled only two-level keys;
- DEVOPS_CLI_AI_TASK_* overrides failed the same way and were silently dropped.

`devops ai config` now accepts `gateway`, and --task sets provider, model, URLs and
retries for one task. `dotted_set` takes keys of any depth, coerces an unset field by
its declared type, and refuses keys naming no field. Environment overrides apply, or
raise a configuration error naming the variable.

Closes #456
@dan-petty dan-petty added this to the v0.2.23 milestone Sep 25, 2026
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/config Settings, OS Keyring, environment variables, and defaults priority/p2-medium Priority P2: standard work labels Sep 25, 2026
@dan-petty
dan-petty merged commit d94d51c into release/v0.2.23 Sep 25, 2026
7 checks passed
@dan-petty
dan-petty deleted the fix/456-gateway-task-settings branch September 25, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p2-medium Priority P2: standard work scope/config Settings, OS Keyring, environment variables, and defaults type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant