Commit Graph
9 Commits
Author SHA1 Message Date
jatmn e3230516ad Scope OpenGateway credentials
Remove OPENAI_API_KEY as an OpenGateway credential fallback so the gateway only looks for OPENGATEWAY_API_KEY.

Add a provider catalog guard test that verifies each built-in provider only advertises credential env vars owned by that provider.
2026-05-31 14:16:34 -07:00
jatmn 0280d849e9 Refine provider catalog pricing docs
Move model pricing currency to provider-level costCurrency and keep numeric cost fields on provider catalog routes.

Split global model typing from provider route model typing so global model metadata stays free of cost data while provider routes can carry pricing.

Add first-party OpenAI route pricing examples and guard tests for provider-owned pricing, global-model pricing drift, and cost.currency regressions.

Make provider docs easier to scan, add top-level provider guidance with concrete brand examples, expand multi-model examples, and remove the standalone example-model-addition.toml file after merging its useful content into docs.
2026-05-31 14:01:04 -07:00
jatmn 8355b4f23c Split provider catalog docs
Move detailed provider catalog reference material from README into docs/provider-catalog with focused provider, model, and example pages.

Keep README lightweight with a minimal gateway example and links to the expanded documentation.

Make top-level credentialEnvVars the canonical provider descriptor field and normalize it into setup, validation, and preset metadata for existing runtime consumers.

Remove duplicated credential env-var declarations from provider TOML descriptors and add tests guarding README size, docs guardrails, single credential declarations, and credential fan-out.
2026-05-31 13:47:13 -07:00
jatmn b78f75b06c Document provider catalog TOML schema
Expand README provider catalog documentation with required vs optional fields, model limits, cost metadata, capabilities, transport overrides, setup, validation, usage, presets, discovery, and runtime notes.

Normalize provider descriptors to keep transportConfig, catalog discovery, preset badge, and model metadata in single TOML blocks with dotted keys.

Add provider catalog tests that guard against nested TOML section drift and verify dotted keys parse into the nested objects used by the loader.
2026-05-31 13:34:33 -07:00
jatmn 188d6507c2 Migrate provider catalog to TOML
- replace JSON provider/model descriptors with TOML definitions and global model metadata

- add provider discovery for OpenAI-compatible, gateway, and localhost catalog entries

- resolve global model references, first-party ownership, and per-model transport overrides

- update provider auth/header handling, dynamic discovery cache behavior, and provider command parsing

- harden file/search tools and align tests/docs/build embedding with the TOML catalog
2026-05-31 13:11:22 -07:00
jatmn c3718ac3a4 Add provider catalog support
Introduce descriptor-driven provider and gateway catalog loading with embedded build assets, OpenGateway catalog metadata, and reusable first-party model metadata.

Wire catalog providers through config loading, runtime factory creation, CLI/TUI provider flows, and OpenAI-compatible custom headers.

Add model discovery with caching, retry-safe failure handling, unsupported-transport guards, command provider_id defaults, and focused provider catalog tests.
2026-05-30 23:11:11 -07:00
8d49c3c0a5 fix plan mode and add test (#2)
* fix plan mode and add test

* Address review: wire plan mode, harden test script, restore friendly errors

- Wire /plan into agent behavior: add PLAN_MODE_SYSTEM_PROMPT and a planMode
  option on runAgent; App passes isPlanMode through so the agent actually
  plans without editing instead of only changing UI color.
- Harden test script to "bun test ./tests --timeout 15000" for deterministic
  discovery and a bounded runtime so it always exits.
- Restore friendly provider-setup/auth/network error mapping via
  toFriendlyError(); debug mode still records the full error object.
- Add tests/agent-loop.test.ts covering prompt selection and the
  tool-call -> result -> final-answer loop with a mock provider.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Kevin Codex <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-05-31 10:08:01 +08:00
JATMN e61d783ba8 Add contributing guidelines (#1) 2026-05-31 09:59:48 +08:00
Kevin Codex d634a36bea initial commit 2026-05-30 08:37:16 +08:00