code-cli icon indicating copy to clipboard operation
code-cli copied to clipboard

Add OpenPaths provider

Open lee101 opened this issue 5 months ago • 0 comments

What

Adds OpenPaths as a first-class named provider. OpenPaths is an OpenAI-compatible model gateway (like OpenRouter), so it slots into the existing provider architecture and reuses the generic OpenAI-compatible client.

  • Base URL: https://openpaths.io/v1
  • Models endpoint: https://openpaths.io/v1/models
  • Default model: openpaths/auto (also openpaths/auto-code, -fast, -reasoning)
  • API key: OPENPATHS_API_KEY (key page: https://openpaths.io/account)

Changes

Additive and minimal — mirrors the OpenRouter wiring exactly across every parallel provider list.

  • src/types.ts: add 'openpaths' to ProviderName, add OpenPathsSettings, add openpaths? to AutohandConfig.
  • src/providers/OpenPathsProvider.ts: new provider (reuses the generic OpenAI-compatible client at the OpenPaths base URL; lists models from /v1/models with a static fallback).
  • src/providers/ProviderFactory.ts: case 'openpaths' + entries in getProviderNames() / isValidProvider().
  • src/config.ts: validProviders, isModernConfig, getProviderConfig (Record + api-key validation branch), defaultBaseUrlFor.
  • src/onboarding/setupWizard.ts & src/core/agent/ProviderConfigManager.ts: add openpaths entries to the exhaustive Record<ProviderName, ...> maps (required to keep typecheck green).
  • tests/providers/ProviderFactory.test.ts: coverage for openpaths (create configured / unconfigured, isValidProvider, updated getProviderNames ordering).

Testing

  • tsc --noEmit (typecheck): passes.
  • eslint on changed files: passes, no warnings.
  • vitest ProviderFactory + config suites: 41 passed.

Note: I've reviewed CONTRIBUTING.md and COMMERCIAL.md — there's no CLA/DCO requirement and the changes are additive under Apache-2.0. If you do require a contributor agreement, I'm happy to sign your CLA.

🤖 Generated with Claude Code

lee101 avatar Jun 16 '26 02:06 lee101