Skip to content

feat(discovery): classify gateway models by capability - #448

Draft
dgokeeffe wants to merge 3 commits into
databricks:mainfrom
dgokeeffe:pr/capability-discovery
Draft

feat(discovery): classify gateway models by capability#448
dgokeeffe wants to merge 3 commits into
databricks:mainfrom
dgokeeffe:pr/capability-discovery

Conversation

@dgokeeffe

@dgokeeffe dgokeeffe commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • classify Responses, Gemini and OSS models from advertised capabilities instead of brittle names
  • filter explicitly NOT_READY endpoints from generated agent catalogues
  • persist validated context/reasoning specifications alongside discovered model IDs
  • retain gateway-only fallbacks when Unity Catalog has not registered a model yet
  • consume validated OSS capabilities in OpenCode and disable its unsupported prompt_cache_key

Why

AI Gateway's model inventory changes continuously. Name-based assumptions can hide new models, expose non-chat models, advertise endpoints that cannot serve traffic, or generate requests the gateway rejects. Capability-driven discovery keeps ucode aligned with the live workspace contract.

Stack

PR C of five. Depends on PR B (pr/claude-discovery-hardening), which depends on A. It is opened as a draft until those land; the isolated review delta is c8e7114..763fa3e.

Planned dependency order: A → B → C → D and E.

  • A: #446 — Pi routing foundation
  • B: #447 — Claude discovery hardening
  • C: #448 — this PR
  • D: #449 — Pi OSS streaming
  • E: #450 — OpenCode native Responses routing

Validation

  • 792 focused discovery/CLI/Claude/OpenCode tests passed
  • explicit NOT_READY, malformed metadata and gateway-only fallback cases are covered
  • Ruff lint and changed-file formatting passed
  • ty check src and git diff --check passed
  • live discovery returned ready native Responses and validated OSS models
  • the complete integration stack passed 2,358 tests with 37 skips; its three failures reproduce unchanged on main

Non-goals

This PR does not add Pi's MLflow repair proxy or OpenCode's native Responses provider; those remain separate dependent PRs.

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