feat(go-models): harden ListModels for FishAudio (#15853) by hunnyboy1217 · Pull Request #15957 · infiniflow/ragflow (original) (raw)
- voyage: Voyage AI exposes no live model-list endpoint (only /v1/embeddings and /v1/rerank), so replace the "no such method" stub with a static-catalog listing sourced from the loaded provider definition, carrying each model's max_tokens, model_types, and embedding dimensions. "list models from voyage" now returns the 13-model catalog instead of erroring.
- fishaudio: route the existing /model voice listing through the shared ParseListModel helper for consistency, keep the human-readable title as the model name, and fall back to _id when a title is blank.
Also includes the shared gitee_test.go DSModelList->ModelList compile fix (infiniflow#15900 rename); it auto-resolves against the sibling infiniflow#15853 PRs.
Tests: voyage static-catalog test asserts the catalog + metadata; fishaudio httptest covers the happy path, title->_id fallback, missing key, and HTTP errors. go build and go vet are clean.
Bot added size:M
This PR changes 30-99 lines, ignoring generated files.
Pull request that refactor/refine code
Feature request, pull request that fullfill a new feature.
labels
[](/apps/coderabbitai)
… to stub (infiniflow#15853)
Per review: Voyage AI's public API exposes only /v1/embeddings and /v1/rerank, with no model-list endpoint (https://docs.voyageai.com/reference). The previous static-catalog ListModels misrepresented a capability the API does not have, so revert it to the not-supported stub used by other endpoint-less providers.
Also removes the static-catalog test (and its global ProviderManager mutation, which CodeRabbit flagged as order-dependent) in favour of a small test asserting ListModels returns a not-supported error. FishAudio (which does have a /model endpoint) is unchanged.
This PR changes 10-29 lines, ignoring generated files.
and removed size:M
This PR changes 30-99 lines, ignoring generated files.
labels
[](/apps/coderabbitai)
Removed outdated comments regarding Fish Audio model parsing.
Removed unsupported ListModels test for Voyage.
Haruko386 changed the title
feat(go-models): implement ListModels for Voyage and FishAudio (#15853) feat(go-models): harden ListModels for FishAudio (#15853)
This PR has been approved by a maintainer
label
Haruko386 marked this pull request as ready for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})