Skip to content

feat(loop-init): add cheaperinference model provider - #653

Open
aiapienthusiast wants to merge 1 commit into
cobusgreyling:mainfrom
aiapienthusiast:cheaperinference-provider
Open

aiapienthusiast wants to merge 1 commit into
cobusgreyling:mainfrom
aiapienthusiast:cheaperinference-provider

Conversation

@aiapienthusiast

Copy link
Copy Markdown

Summary

This PR adds Cheaper Inference as a model provider in loop-init.
It uses the same pattern as #569 (OrcaRouter).

Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.

Usage:

npx @cobusgreyling/loop-init . -p ci-sweeper -t claude --with-foundry --model-provider cheaperinference
npx @cobusgreyling/loop-init . -p ci-sweeper -t claude --with-foundry --model-provider cheaperinference --model claude-sonnet-5

The default model is gpt-5.4-mini.
Set CHEAPER_INFERENCE_API_KEY to a key from https://cheaperinference.com/signup.

Related issue

None.

Changes

  • New pattern or starter (followed templates/pattern-template.md + updated registry.yaml)
  • Doc / example / story improvement
  • Tool / CLI change under tools/
  • Test only
  • Other

Checklist (from CONTRIBUTING)

  • Links work from README or the relevant index
  • No secrets, tokens, or internal company URLs
  • STATE.md* examples use .example suffix
  • Safety-related content references docs/safety.md
  • If you touched a package under tools/<pkg>: cd tools/<pkg> && npm ci && npm test
  • If you touched the registry: root npm ci && npm run validate:registry

Testing / Dogfood

  • npx @cobusgreyling/loop audit . (or package-local tests) on affected paths
  • Manual review of generated state / skill output if scaffolding changed
Details

Files:

  • tools/loop-init/src/cli.ts: add the cheaperinference provider and the model/cheaperinference primitive.
  • tools/loop-init/dist/cli.js: rebuilt with npm run build.
  • tools/loop-init/README.md: document the flag, models and endpoints.
  • tools/loop-init/test/cli.test.mjs: 4 new tests, same as the OrcaRouter tests.

The primitive writes these endpoints:

  • OpenAI-compatible: https://api.cheaperinference.com/v1
  • Anthropic-compatible: https://api.cheaperinference.com (clients add /v1/messages)

Model options: gpt-5.4-mini, gpt-5.4, claude-sonnet-5, gemini-3.1-pro, deepseek-v4-flash, glm-5.3.

Tests:

  • cd tools/loop-init && npm ci && npm test: 68 of 69 pass. All 4 new tests pass.
  • The one failure is loop-init prints Loop Ready score after scaffold. It also fails on main in my environment.
  • npm run check:loop-init: OK.

Live check: gpt-5.4-mini returned a reply through both endpoints in the generated .foundry/stack.yaml.
All model ids in the primitive are in the live GET /v1/models list.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This PR changes paths that must run the real validate and audit workflows (tools, patterns, scripts, or CI).

Fork PRs from first-time contributors start with those workflows waiting for approval. A maintainer needs to open the Checks tab and click Approve and run workflows. Until that happens, branch protection will show the PR as blocked even after a review.

Content-only PRs (docs/, examples/, stories/, skills/, root markdown) skip this step — required checks are posted from this workflow instead.

— loop-engineering fork-pr-gate

This branch has not been deployed

No deployments
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.

1 participant