Skip to content

feat(models): discover OpenAI-compatible provider models - #57

Merged
Blankeos merged 5 commits into
Blankeos:mainfrom
yan-ad:feat/openai-compatible-model-discovery
Oct 4, 2026
Merged

Blankeos merged 5 commits into
Blankeos:mainfrom
yan-ad:feat/openai-compatible-model-discovery

Conversation

@yan-ad

@yan-ad yan-ad commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Closes #56

Summary

  • discover model IDs from configured OpenAI-compatible provider /v1/models endpoints
  • send the configured API key as a bearer token and tolerate unsupported or invalid endpoints
  • reuse catalog metadata when IDs match, while manual model configuration remains authoritative
  • make discovered models available in warm and cold /models catalog paths

Validation

  • cargo fmt
  • cargo check
  • cargo test model::discovery::tests

@Blankeos

Blankeos commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Thanks @yan-ad — this is a useful addition! I pushed a maintainer follow-up in e53e9c6 and merged current main into the branch in 16d6891 before merging this PR.

The follow-up addresses two gaps from review:

  • Discovery now feeds the shared provider catalog rather than converting picker rows back into incomplete catalog models. Picker and runtime lookups retain image modalities, reasoning options, tool capabilities, context/output limits, and other catalog metadata. Advertised IDs are cached; metadata is resolved against the current catalog; manual settings remain authoritative. Reference-provider routing is removed so requests stay on the configured gateway.
  • Model discovery reuses the SDK's version-segment handling, including /v4 and multi-digit versions, instead of appending an extra /v1. The helper now parses URL paths so query strings are not mistaken for version segments.

Regression coverage includes fresh request-time Discovery instances, picker/runtime consistency, manual overrides, cache invalidation, unsupported endpoint fallback, and versioned URLs. The merge resolution also preserves main's newer context-window fields and shares discovered metadata with output-limit/modality lookups.

Validation:

  • cargo fmt --check, cargo check, git diff --check, and the aisdk boundary check pass.
  • Integrated branch: 76 model tests and all 7 ACP stdio integration tests pass.
  • Before integrating main: all 1,540 unit tests passed; SDK-provider, request-client, and command-handler tests also passed separately.
  • After integrating main: 1,696 unit tests pass; one existing compaction regression (prior_summary_billed_tokens_do_not_inflate_selection_head) fails in code unchanged from main. I independently reproduced the identical failure on unmodified main (0ea15f8). This is separate from model discovery.

The original worktree-path-sensitive UI assertion was verified by running the compiled tests from the expected project directory. With the discovery fixes in place, this looks ready to merge. Thanks again!

btw my agent wrote this aha

@Blankeos
Blankeos merged commit 503962d into Blankeos:main Oct 4, 2026
6 checks passed
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.

[Feature] Auto-discover models for OpenAI-compatible providers

2 participants