Skip to content

feat(core): expand MODEL_PROVIDERS with OpenAI, Google, and OpenRouter#111

Open
stepandel wants to merge 1 commit intomainfrom
feature/AGE-148-expand-model-providers
Open

feat(core): expand MODEL_PROVIDERS with OpenAI, Google, and OpenRouter#111
stepandel wants to merge 1 commit intomainfrom
feature/AGE-148-expand-model-providers

Conversation

@stepandel
Copy link
Owner

Summary

Adds OpenAI, Google Gemini, and OpenRouter to MODEL_PROVIDERS and KEY_INSTRUCTIONS in packages/core/src/constants.ts. Adds a getProviderForModel() helper to extract provider keys from model strings.

Changes

  • packages/core/src/constants.ts — Added 3 new provider entries, 3 new KEY_INSTRUCTIONS, and getProviderForModel() helper
  • packages/core/src/index.ts — Re-exported getProviderForModel
  • packages/core/src/__tests__/constants.test.ts — 13 new tests

Test Results

All 26 tests pass. The 2 pre-existing CLI test failures are unrelated package resolution issues on main.

Closes AGE-148

- Add openai, google, openrouter entries to MODEL_PROVIDERS
- Add KEY_INSTRUCTIONS for each provider's API key
- Add getProviderForModel() helper to extract provider from model strings
- Add comprehensive unit tests for new constants and helper

Closes AGE-148
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Warning

Rate limit exceeded

@stepandel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/AGE-148-expand-model-providers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@stepandel
Copy link
Owner Author

🔍 QA Review — APPROVED

All acceptance criteria for AGE-148 verified against the diff:

  • MODEL_PROVIDERS has entries for anthropic, openai, google, openrouter
  • ✅ Each entry has name, envVar, keyPrefix, and models array
  • ✅ Google has empty keyPrefix (no standard prefix validation)
  • ✅ OpenRouter has empty models array (user picks any model string)
  • KEY_INSTRUCTIONS has setup steps for openaiApiKey, googleApiKey, openrouterApiKey
  • getProviderForModel() correctly extracts provider from model strings
  • ✅ Re-exported from packages/core/src/index.ts
  • ✅ Build passes clean (tsc)
  • ✅ All 26 tests pass (13 existing schema + 13 new constants tests)

Ship it 🚢

@stepandel
Copy link
Owner Author

🔍 QA — APPROVED by Scout

Build: ✅ clean
Tests: ✅ 45/45 passed (4 test files)
Diff reviewed against ticket acceptance criteria: ✅

Ship it 🚢

Copy link
Owner Author

@stepandel stepandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 QA Review — APPROVED

All acceptance criteria verified against the diff. Build passes clean. All 45 tests pass (including new constants.test.ts).

Ship it 🚢

@stepandel
Copy link
Owner Author

🔍 QA Review — Approved

AGE-148: MODEL_PROVIDERS expanded, KEY_INSTRUCTIONS added, getProviderForModel() with tests. 45/45 pass.

Tested by Scout (automated QA) — build, tests, and acceptance criteria verified.

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