Skip to content

⚙️ FEATURE-#58: Resolve bundled provider templates by bare name - #59

Merged
FernandoCelmer merged 3 commits into
masterfrom
feature/58
Aug 16, 2026
Merged

⚙️ FEATURE-#58: Resolve bundled provider templates by bare name#59
FernandoCelmer merged 3 commits into
masterfrom
feature/58

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Description

  • pycodeloop/providers/__init__.py — Adds BUNDLED_TEMPLATES, the set of template stems discovered from providers/templates/*.json at import time. get_provider() resolves a bare name in that set (e.g. "anthropic", "ollama") to the packaged JSON path before falling through to the PROVIDERS registry or module:Class syntax. Extracted the JSON-loading branch into _from_json_path() so both the path and bare-name cases share it.
  • pycodeloop/cli/flow.pyresolve_provider() now treats a bundled template name the same as a .json path when building kwargs, so it doesn't force-override the template's own model with Settings.MODEL when --model isn't passed.

Motivation and Context

--provider required a full/relative path to a JSON template, so running the CLI from outside the repo always needed the full path to pycodeloop/providers/templates/*.json. Now the bundled templates resolve by short name from anywhere the package is installed:

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

Closes #58.

Types of changes

  • New feature (change which adds functionality)
  • Bug fix
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer
FernandoCelmer merged commit db16873 into master Aug 16, 2026
8 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/58 branch August 16, 2026 02:09
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.

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

1 participant