Skip to content

feat(loop-init): add API Route provider - #697

Open
DennyHo0917 wants to merge 1 commit into
cobusgreyling:mainfrom
DennyHo0917:feature/api-route-provider
Open

DennyHo0917 wants to merge 1 commit into
cobusgreyling:mainfrom
DennyHo0917:feature/api-route-provider

Conversation

@DennyHo0917

Copy link
Copy Markdown

Summary

Add an optional API Route provider to loop-init --with-foundry, following the existing provider selection approach in #653.

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

--model-provider api-route emits model/api-route with the OpenAI-compatible endpoint https://global.api-route.com/v1. It defaults to gpt-6.1-sol and accepts an explicit model ID without embedding a static model catalog or unverified context limits. The selected ID is quoted in YAML. Source and compiled CLI are included, with setup documentation and four CLI regression tests.

API keys are configured in the consuming runtime and are never written into the scaffold. This preset documents the verified OpenAI-compatible endpoint only.

Checklist (from CONTRIBUTING)

  • Links work from README or the relevant index
  • No secrets, tokens, or internal company URLs
  • STATE.md* examples use .example suffix — not applicable; no state examples changed
  • Safety-related content references docs/safety.md — not applicable; no safety content changed
  • If you touched a package under tools/<pkg>: cd tools/<pkg> && npm ci && npm test — executed; see the existing baseline failure below
  • If you touched the registry: root npm ci && npm run validate:registry — not applicable; registry unchanged

Testing / Dogfood

  • npx @cobusgreyling/loop audit . (or package-local tests) on affected paths

  • Manual review of generated state / skill output if scaffolding changed

  • npm ci and npm test under tools/loop-init: TypeScript build succeeds; 72/73 tests pass, including all four new API Route cases.

  • node --test --test-name-pattern 'API Route' test/cli.test.mjs: 4/4 pass.

  • The sole full-suite failure is the existing loop-init prints Loop Ready score after scaffold assertion: it expects /Loop Ready:/, while output contains === Loop Ready score ===. I reproduced the same failure using the unchanged base commit's compiled CLI, then restored the new build.

  • Root npm run check:loop-init: passes.

  • Generated a Codex ci-sweeper scaffold, parsed .foundry/stack.yaml, and used its actual endpoint/model with the OpenAI SDK and an environment-supplied API Route key: gpt-6.1-sol returned API Route OK. This validates the generated provider configuration, not a complete loop execution.

  • git diff --check: passes.

I am affiliated with API Route. This is an optional provider preset; existing provider defaults and dependencies are unchanged.

Signed-off-by: dennyho0917 <dennyho0917@gmail.com>
@github-actions

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

@cobusgreyling

Copy link
Copy Markdown
Owner

Leaving this open. The merge state is BLOCKED, only the fork gate check is green, and there is no approving review.

@cobusgreyling

Copy link
Copy Markdown
Owner

The Validate and Audit runs are approved. This stays open: it is a behavior change, and it still needs those checks to pass and an approving review before it can merge.

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.

2 participants