Skip to content

Support bare provider template names (--provider anthropic) without a path #58

Closed

Description

@FernandoCelmer

Feature

`--provider` currently requires either a full/relative path to a JSON template (`--provider templates/anthropic.json`) or `--provider generic --url ...`. There's no way to reference a template bundled with the installed package by its short name, so running from outside the repo always needs a full path to `pycodeloop/providers/templates/*.json`.

Fix

  • `pycodeloop/providers/init.py` — added `BUNDLED_TEMPLATES` (set of template stems discovered from `providers/templates/*.json` at import time) and made `get_provider()` resolve a bare name in that set to the packaged JSON path before falling through to the `PROVIDERS` registry / `module:Class` syntax.
  • `pycodeloop/cli/flow.py` — `resolve_provider()` now treats a bundled template name the same as a `.json` path for kwargs building, so it doesn't force-override the template's own `model` with `Settings.MODEL` when the user didn't pass `--model`.

Usage after the fix

```bash
pycodeloop --provider anthropic
pycodeloop --provider ollama
pycodeloop run "..." --provider openai --model gpt-5
```

Works from any directory once the package is installed — no path needed.

Activity

  1. added a commit that references this issue on Aug 16, 2026
  2. added a commit that references this issue on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions