Skip to content

[feat] Refresh model catalogs and preserve provider names - #6640

Open
mmabrouk wants to merge 2 commits into
mainfrom
agent/update-model-catalogs
Open

[feat] Refresh model catalogs and preserve provider names#6640
mmabrouk wants to merge 2 commits into
mainfrom
agent/update-model-catalogs

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Sep 7, 2026

Copy link
Copy Markdown
Member

Context

Astra and other current models were absent from the Pi, Codex, OpenAI, Anthropic, and OpenRouter choices. Provider refreshes also discarded human-readable model names, so newly discovered OpenRouter models appeared as raw slugs.

Changes

This updates the pinned Pi package to 0.85.1, regenerates its 512-model catalog, and adds GPT-6 Astra to the Pi subscription, Codex, and OpenAI selections. Anthropic defaults now use its current four-model lineup.

OpenRouter now exposes and preselects exactly the 10 most-used tool-capable text models returned by GET /api/v1/models?sort=most-popular. The canonical list and recommended defaults use the same ordered top 10.

Provider probes now return a backward-compatible model_names map alongside model ids. OpenRouter name, Anthropic display_name, and Gemini displayName values are saved with selected models and shown in provider settings and the model picker after reload.

The sync-model-catalog skill now documents the complete refresh workflow. Its audit script compares both checked-in OpenRouter lists with the live usage ranking and defaults to 10 for each.

Sources:

Tests / notes

  • API provider probe tests: 94 passed.
  • SDK model catalog, capability, and supported-model tests: 187 passed, 6 expected registry-lag xfails.
  • Web provider connection tests: 88 passed.
  • Web package type checks passed for shared, entities, and entity-ui.
  • Runner Pi validation tests passed, and runner TypeScript type checking passed.
  • The live OpenRouter audit reports no missing or stale entries and confirms both top-10 lists match.
  • The generated Pi catalog accounts for most of the diff.

What to QA

  • Open Manage Providers, test an OpenRouter key, and refresh models. Each row should show the provider's friendly name above its raw slug.
  • Confirm that OpenRouter shows exactly 10 models and preselects all 10 for a connection with no saved selection.
  • Select a newly discovered model, save, reopen the provider, and confirm its friendly name remains.
  • Open the agent model picker with Pi and Codex. Astra should appear as Astra and be selectable.
  • Check OpenAI and Anthropic connections with no saved model selection. Their updated recommended models should be preselected.

A browser recording is outstanding because this branch has not been deployed to a QA environment.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 7, 2026 7:01pm UTC

Request Review

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 4732d69d-97e3-47f9-adb6-2af053cfa536

📥 Commits

Reviewing files that changed from the base of the PR and between ab74027 and 73a6d14.

⛔ Files ignored due to path filters (3)
  • sdks/python/agenta/sdk/agents/data/pi_models.generated.json is excluded by !**/*.generated.*
  • services/runner/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • web/packages/agenta-api-client/src/generated/api/types/DiscoveryResult.ts is excluded by !**/generated/**
📒 Files selected for processing (26)
  • .agents/skills/sync-model-catalog/SKILL.md
  • .agents/skills/sync-model-catalog/audit_provider_models.py
  • api/oss/src/core/providers/adapters.py
  • api/oss/src/core/providers/dtos.py
  • api/oss/tests/pytest/unit/providers/test_provider_probe.py
  • clients/python/agenta_client/types/discovery_result.py
  • sdks/python/agenta/sdk/agents/capabilities.py
  • sdks/python/agenta/sdk/agents/data/codex_models.curated.json
  • sdks/python/agenta/sdk/agents/data/pi_models.curated.json
  • sdks/python/agenta/sdk/utils/assets.py
  • sdks/python/oss/tests/pytest/unit/agents/connections/test_capabilities.py
  • sdks/python/oss/tests/pytest/unit/agents/connections/test_model_catalog.py
  • services/runner/images/sandbox/daytona/README.md
  • services/runner/images/sandbox/daytona/build_snapshot.py
  • services/runner/package.json
  • services/runner/src/engines/sandbox_agent/daytona.ts
  • services/runner/src/tools/pi-validation-patch.ts
  • services/runner/tests/unit/pi-validation-patch.test.ts
  • web/packages/agenta-entities/src/secret/api/probe.ts
  • web/packages/agenta-entities/src/secret/core/connections.ts
  • web/packages/agenta-entities/src/secret/core/promptModelGroups.ts
  • web/packages/agenta-entities/src/secret/core/transforms.ts
  • web/packages/agenta-entities/tests/unit/provider-connections.test.ts
  • web/packages/agenta-entity-ui/src/secretProvider/ActiveModelsSection.tsx
  • web/packages/agenta-entity-ui/src/secretProvider/ProviderConnectionCard.tsx
  • web/packages/agenta-shared/src/types/llmProvider.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Provider-supplied model display names now appear throughout connection setup and model selection.
    • Search can find models by either their display name or ID.
    • Model display names are preserved when saving provider connections.
    • Added support for auditing OpenRouter recommendations and catalog gaps.
  • Updates

    • Refreshed supported model catalogs, defaults, aliases, and curated metadata.
    • Added support for new OpenAI, Anthropic, Codex, and OpenRouter models.
    • Updated the bundled Pi coding agent to version 0.85.1.

Walkthrough

The change refreshes model catalogs and Pi version pins. Provider discovery now returns display names. Web connection models preserve, search, render, and serialize those names.

Changes

Model catalog refresh and runtime pins

Layer / File(s) Summary
Catalog refresh, metadata, and runtime alignment
.agents/skills/sync-model-catalog/SKILL.md, .agents/skills/sync-model-catalog/audit_provider_models.py, sdks/python/agenta/sdk/agents/..., sdks/python/agenta/sdk/utils/assets.py, sdks/python/oss/tests/..., services/runner/...
Catalog guidance and the OpenRouter audit script are added. OpenAI, Anthropic, Codex, Pi, and OpenRouter model lists and metadata are refreshed. Pi is pinned to version 0.85.1. Related tests are updated.

Provider discovery names

Layer / File(s) Summary
Discovery contracts and provider adapters
api/oss/src/core/providers/adapters.py, api/oss/src/core/providers/dtos.py, clients/python/agenta_client/types/discovery_result.py, api/oss/tests/pytest/unit/providers/test_provider_probe.py
Provider probes extract display names into DiscoveryResult.model_names. OpenRouter, Anthropic, and Gemini adapters supply provider-specific name extractors. API types and probe tests include the new field.

Connection persistence and model UI

Layer / File(s) Summary
Display-name propagation and rendering
web/packages/agenta-entities/src/secret/..., web/packages/agenta-shared/src/types/llmProvider.ts, web/packages/agenta-entity-ui/src/secretProvider/..., web/packages/agenta-entities/tests/unit/provider-connections.test.ts
Connection transformations preserve modelNames and serialize names in extras.name. Model options and UI rows use provider names while retaining model IDs. Search matches both names and IDs. Tests cover discovery, options, and payload persistence.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 73a6d

This updates model catalogs and preserves provider-supplied display names through settings and model selection. The changes are covered across the affected layers and are ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant ProviderConnectionCard
  participant probeProvider
  participant ProviderAdapter
  participant ConnectionPayload
  ProviderConnectionCard->>probeProvider: request provider discovery
  probeProvider->>ProviderAdapter: fetch model catalog
  ProviderAdapter-->>probeProvider: return models and model_names
  probeProvider-->>ProviderConnectionCard: provide available names
  ProviderConnectionCard->>ConnectionPayload: save selected models with extras.name
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.70% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 21 files. (5 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary changes: refreshing model catalogs and preserving provider display names.
Description check ✅ Passed The description directly explains the catalog refresh, provider-name preservation, implementation changes, tests, and QA steps.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 8.70% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 21 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/update-model-catalogs

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.

@mmabrouk
mmabrouk marked this pull request as ready for review September 7, 2026 19:24
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6640.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6640-e0d0c57
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-09-07T19:36:20.090Z

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.

3 participants