Skip to content

Add frontier free providers and AA-calibrated routing#80

Merged
0xzr merged 2 commits into
mainfrom
feat/frontier-free-providers
Jul 20, 2026
Merged

Add frontier free providers and AA-calibrated routing#80
0xzr merged 2 commits into
mainfrom
feat/frontier-free-providers

Conversation

@0xzr

@0xzr 0xzr commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • add Morph and Vercel AI Gateway with conservative recurring-free allowance hints
  • map Morph aliases and bundle current Artificial Analysis capability scores for frontier routing
  • correct ModelScope per-model quota from 500 to 200 requests/day
  • refresh provider docs, account instructions, privacy notes, and catalog counts

Validation

  • 762 tests pass
  • coverage: 85.23% lines / 72.75% branches
  • Ruff passes
  • count checker passes: 24 providers, 247 enabled chat routes, 405 cataloged chat models
  • live proxy quality completion returns proxy-ok
  • Cloudflare GLM-5.2 was explicitly excluded after a live request proved it requires Workers Paid

Known baseline

  • full mypy currently reports the repository baseline of 301 errors across 33 existing modules; this change introduces no new typed surface errors

Summary by Sourcery

Add new frontier free-tier providers and update catalog metadata and routing scores to reflect their inclusion and current quotas.

New Features:

  • Introduce Morph and Vercel AI Gateway as cataloged OpenAI-compatible free-tier providers with conservative per-model quota hints.
  • Expose privacy, account, and usage guidance for Morph and Vercel AI Gateway in user-facing documentation and FAQ.

Enhancements:

  • Align ModelScope per-model quota configuration and documentation with the current 200-requests/day cap.
  • Normalize Morph-specific frontier model aliases to shared benchmark identities so quality routing can compare them consistently across providers.
  • Bundle updated capability scores for current frontier models to drive AA-calibrated routing choices.
  • Refresh English and Spanish README, site copy, promotional materials, and metadata to reflect the expanded catalog size and updated route/model counts.

Tests:

  • Add catalog and capability tests to cover the new Morph and Vercel providers, enforce aggregate quota hints, and validate updated frontier score relationships.
  • Update tests that assert provider counts, route counts, and catalog metadata to match the expanded catalog and new documentation text.

@sourcery-ai

sourcery-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds two new frontier free providers (Morph and Vercel AI Gateway), calibrates their routing via model-name normalization and bundled capability scores, corrects ModelScope per-model quotas, and refreshes all catalog/docs/tests/metadata to reflect the expanded provider and route counts and new privacy/account details.

Flow diagram for model-name normalization and Morph alias mapping

flowchart TD
    A[Model name from provider e.g. morph-glm52-744b] --> B[normalize_model_name]
    B --> C[Strip provider prefixes and suffixes]
    C --> D[Apply _MODEL_NAME_ALIASES mapping]
    D --> E[Normalized name e.g. glm-5.2]
    E --> F[Use normalized name to look up capability_scores for frontier routing]
Loading

File-Level Changes

Change Details Files
Introduce Morph and Vercel AI Gateway as new OpenAI-compatible free-tier providers with conservative per-model request-per-day hints and catalog coverage tests.
  • Add Morph provider block with three fast models and low rpd hints sized to 200 free requests/month.
  • Add Vercel AI Gateway provider block with five high-rated models and rpd hints sized to $5/month Hobby credit.
  • Add tests that assert Morph and Vercel are present in the packaged catalog with correct base URLs, env vars, enabled model sets, and aggregate rpd caps.
  • Update README provider table and account setup docs to document Morph and Vercel keys, free-tier behavior, and frontier positioning.
src/freellmpool/providers.toml
tests/test_config.py
README.md
docs/ACCOUNTS.md
docs/free-llm-api-providers-list.html
FAQ.md
Adjust ModelScope per-model quotas from 500 to 200 rpd to match current free-tier documentation and enforce this in tests and docs.
  • Lower rpd values from 500 to 200 for all enabled ModelScope models in the catalog.
  • Update account docs to describe the 200 rpd per-model cap instead of 500.
  • Add a test asserting that all enabled ModelScope models have rpd == 200.
src/freellmpool/providers.toml
docs/ACCOUNTS.md
tests/test_config.py
Improve frontier quality routing by normalizing Morph’s alias model names to shared benchmark identities and asserting bundled Artificial Analysis capability scores for key frontier models.
  • Add a _MODEL_NAME_ALIASES mapping that collapses Morph’s catalog names (e.g., morph-glm52-744b) to canonical benchmark names (e.g., glm-5.2).
  • Wire alias handling into normalize_model_name so vendor prefixes and Morph-specific names normalize to shared identities used across providers.
  • Add tests exercising Morph aliases normalization against benchmark names.
  • Add tests that assert the bundled capability scores encode relationships between frontier models (glm-5.2 vs mimo-v2.5-pro, equality between minimax-m3 and deepseek-v4-pro, etc.).
  • Refresh capability_scores.json to include current Artificial Analysis-derived scores for the frontier models used in routing.
src/freellmpool/capability.py
tests/test_capability.py
src/freellmpool/capability_scores.json
Refresh catalog-wide counts (providers, routes, models) and marketing/metadata surfaces to reflect the expanded pool and ensure consistency across docs, assets, and release tooling.
  • Update all human-facing docs (English and Spanish READMEs, FAQ, guides, HTML pages) to say 24 cataloged providers, 247 enabled chat routes, and 405 cataloged chat models.
  • Adjust social/promotion copy, directory submissions, and GitHub discovery docs to use the new counts and frontier-provider mentions (Morph, Vercel).
  • Update plugin and project descriptions (pyproject.toml, llm-freellmpool plugin) and server.json registry metadata to match the new catalog counts.
  • Update tests that assert specific counts and description strings (FAQ provider count, demo asset text, GitHub discovery description, MCP listings, release tools’ catalog count tripwire, Spanish README tracking test, social preview text).
  • Implicitly refresh SVG/PNG assets that encode route/provider counts so they match the new 24/247 card text.
README.md
README.es.md
FAQ.md
docs/index.html
docs/free-llm-api-providers-list.html
docs/promotion/social-short-posts.md
docs/promotion/outreach-notes.md
docs/promotion/reddit-local-llama.md
docs/promotion/reddit-opencode.md
docs/promotion/reddit-mcp.md
docs/run-coding-agents-on-free-models.html
docs/run-opencode-on-free-models.html
docs/best-free-llm-api-gateway.html
docs/capacity-management.html
docs/free-alternative-to-openrouter.html
docs/use-multiple-free-llm-apis.html
docs/promotion/README.md
docs/promotion/directory-submissions.md
docs/promotion/long-form-article.md
docs/promotion/product-hunt.md
docs/promotion/reddit-open-source.md
docs/promotion/reddit-targets.md
docs/promotion/reply-bank.md
docs/promotion/show-hn.md
docs/GITHUB_DISCOVERY.md
docs/free-claude-api.html
plugins/llm-freellmpool/README.md
plugins/llm-freellmpool/pyproject.toml
pyproject.toml
server.json
tests/test_github_discovery.py
tests/test_faq.py
tests/test_spanish_readme.py
tests/test_mcp_listings.py
tests/test_release_tools.py
assets/demo.svg
assets/social-preview.svg
assets/tokenmax-results.svg

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The Morph and Vercel tests in test_packaged_catalog_includes_frontier_free_providers encode the current rpd sums as <= 6 and <= 5; consider asserting the exact expected total (or deriving it from a single shared constant) so these tests fail loudly if the per-model hints change unintentionally.
  • The _MODEL_NAME_ALIASES map in capability.py now encodes provider-specific alias knowledge in code; you might want a brief comment pointing back to the provider config or AA source of truth so future updates to Morph/Vercel models are less likely to miss a required alias update.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Morph and Vercel tests in `test_packaged_catalog_includes_frontier_free_providers` encode the current `rpd` sums as `<= 6` and `<= 5`; consider asserting the exact expected total (or deriving it from a single shared constant) so these tests fail loudly if the per-model hints change unintentionally.
- The `_MODEL_NAME_ALIASES` map in `capability.py` now encodes provider-specific alias knowledge in code; you might want a brief comment pointing back to the provider config or AA source of truth so future updates to Morph/Vercel models are less likely to miss a required alias update.

## Individual Comments

### Comment 1
<location path="README.es.md" line_range="397" />
<code_context>
+| **freellmpool** | Sí: Pollinations, OVHcloud, Kilo Gateway; LLM7 permite clave opcional | 24 proveedores chat catalogados | Sí: prueba el siguiente proveedor ante rate limits, timeouts, 5xx, respuestas vacías y errores de transporte | Sí: `freellmpool mcp` | Sí: `freellmpool ask`, `tokenmax`, `providers`, `proxy` y más | Sí: `/v1/audio/transcriptions` compatible con OpenAI y failover de proveedor | Sí: paquete Python local y proxy local | MIT |
</code_context>
<issue_to_address>
**nitpick (typo):** Minor Spanish grammar improvement: consider "24 proveedores de chat catalogados".

In that table row, please change "24 proveedores chat catalogados" to "24 proveedores de chat catalogados" so the Spanish reads naturally while keeping the same meaning.

```suggestion
| **freellmpool** | Sí: Pollinations, OVHcloud, Kilo Gateway; LLM7 permite clave opcional | 24 proveedores de chat catalogados | Sí: prueba el siguiente proveedor ante rate limits, timeouts, 5xx, respuestas vacías y errores de transporte | Sí: `freellmpool mcp` | Sí: `freellmpool ask`, `tokenmax`, `providers`, `proxy` y más | Sí: `/v1/audio/transcriptions` compatible con OpenAI y failover de proveedor | Sí: paquete Python local y proxy local | MIT |
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread README.es.md Outdated
@0xzr
0xzr merged commit 90ceb13 into main Jul 20, 2026
8 checks passed
@0xzr
0xzr deleted the feat/frontier-free-providers branch July 20, 2026 03:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ceb7119d70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

_MODEL_NAME_ALIASES = {
"morph-glm52-744b": "glm-5.2",
"morph-minimax3-428b": "minimax-m3",
"morph-dsv4flash": "deepseek-v4-flash",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep Morph DeepSeek Flash scoring consistent

When MORPH_API_KEY is configured, model_capability("morph-dsv4flash") normalizes to deepseek-v4-flash, but there is no bundled score for that key, so the fallback heuristic is run on the original alias string and misses the flash down-weight. The same underlying ModelScope model (deepseek-ai/DeepSeek-V4-Flash) scores 0.40 while the Morph alias scores 0.50, so quality routing no longer compares identical DeepSeek Flash targets equally as this alias comment promises.

Useful? React with 👍 / 👎.

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