← Back to PRs

#3792: add ShengSuanYun (胜算云) as a model provider

by shengsuan open 2026-01-29 05:52 View on GitHub →
docs gateway cli commands agents size: XL
add ShengSuanYun (胜算云) as a model provider with dynamic model discovery for both LLM and multimodal models (text-to-image, image-to-video, etc.). <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds ShengSuanYun (胜算云) as a model provider, including: - A new discovery module (`src/agents/shengsuanyun-models.ts`) that fetches LLM models from `/models` and multimodal models from `/modalities/list`, and converts them into `ModelDefinitionConfig` entries. - Wiring into implicit provider resolution (`src/agents/models-config.providers.ts`) so the provider is only added when a key/profile is present. - Onboarding/auth-choice flow support to store a ShengSuanYun API key and set a default model (`src/commands/*`). - Docs and changelog updates. Main issues found are around onboarding reliability (async credential persistence) and a missing mapping that prevents the `--token-provider shengsuanyun` path from ever selecting the ShengSuanYun auth choice. Additionally, multimodal input typing currently treats video models as `image`, which may mislead downstream capability checks. <h3>Confidence Score: 3/5</h3> - This PR is reasonably safe to merge, but has a couple of onboarding/flow correctness issues worth fixing first. - Core integration is straightforward (new provider + discovery + config wiring) and failures generally fall back to empty model lists. However, there are two user-facing correctness problems: ShengSuanYun credentials may not be persisted before proceeding (missing await/return), and the CLI token-provider remap omits ShengSuanYun so that flow won’t work as intended. Multimodal modality typing may also misrepresent capabilities depending on how `input` is used elsewhere. - src/commands/onboard-auth.credentials.ts, src/commands/auth-choice.apply.api-providers.ts, src/agents/shengsuanyun-models.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs