1jehuang / 1jehuang/jcode

Add SSYCloud as a built-in OpenAI-compatible provider

Open
#1,046 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Add SSYCloud as a built-in OpenAI-compatible provider — validated implementation available

Summary

Add SSYCloud as a built-in OpenAI-compatible provider with canonical id
ssycloud and display name SSYCloud.

A validated implementation is available in my fork:

PR creation from forks appears restricted, so I am filing the implementation
as an issue/reference branch.

Provider configuration

  • Provider id: ssycloud
  • Display name: SSYCloud
  • API base: https://router.shengsuanyun.com/api/v1
  • API key environment variable: SSYCLOUD_API_KEY
  • Environment file: ssycloud.env
  • Default model: deepseek/deepseek-v4-flash

The former name shengsuanyun is intentionally not added as an alias.

Implemented scope

  • Provider metadata and login entry
  • jcode login --provider ssycloud
  • Separate SSYCloud authentication status
  • TUI display using SSYCloud
  • Live model catalog parsing and Chat Completions filtering
  • Conservative multimodal/image capability detection
  • Native auto_route: true request option
  • provider-doctor support
  • README and provider-doctor documentation
  • Regression and request-shape tests

How to use

1. Configure credentials

Use the built-in login flow:

jcode login --provider ssycloud

Alternatively, provide the API key through the environment:

export SSYCLOUD_API_KEY="<your-api-key>"
2. Validate authentication and model catalog
jcode auth-test --provider ssycloud --no-smoke
jcode provider-doctor ssycloud --tier catalog

The catalog tier validates the credential, fetches the live model catalog,
reloads it into jcode, and checks picker/model-switch routing without running
the paid completion tests.

For full API validation, including chat, streaming, and tool calls:

jcode provider-doctor ssycloud --tier full

The full tier sends paid API requests and consumes quota.

3. Start an interactive session
jcode \
  --provider ssycloud \
  --model deepseek/deepseek-v4-flash
4. Run from the command line
jcode \
  --provider ssycloud \
  --model deepseek/deepseek-v4-flash \
  run "Reply with exactly SSYCLOUD_OK"
5. Make SSYCloud the default provider

Add this to ~/.jcode/config.toml:

[provider]
default_provider = "ssycloud"
default_model = "deepseek/deepseek-v4-flash"

Then reload the running server:

jcode server reload --force

Verification

Validated with a real SSYCloud API key:

  • jcode provider-doctor ssycloud --tier catalog
  • Credential loaded successfully
  • Live catalog returned 191 models
  • Catalog reload, picker integration, and model-switch route passed
  • Route resolved through openai-compatible:ssycloud

Local verification:

  • SSYCloud runtime tests: 4 passed
  • Authentication status test passed
  • Nullable catalog capability test passed
  • TUI display test passed
  • CLI provider-id test passed
  • cargo build --locked --profile selfdev -p jcode --bin jcode passed

No API keys or credentials are included in the branch.

Files changed

Commit: 17c2b2f6c

Summary: 24 files changed, 651 insertions, 29 deletions

Complete file list
Documentation
  • README.md
  • docs/PROVIDER_DOCTOR.md
Provider metadata and CLI
  • crates/jcode-provider-metadata/src/catalog.rs
  • src/cli/args.rs
  • src/cli/provider_init.rs
  • src/cli/provider_init_tests.rs
Authentication and provider routing
  • crates/jcode-base/src/auth/lifecycle.rs
  • crates/jcode-base/src/auth/mod.rs
  • crates/jcode-base/src/auth/status_types.rs
  • crates/jcode-base/src/auth/tests.rs
  • crates/jcode-base/src/provider/catalog_routes.rs
  • crates/jcode-base/src/provider/mod.rs
  • crates/jcode-base/src/provider/tests.rs
  • crates/jcode-base/src/provider/tests/model_resolution.rs
  • crates/jcode-base/src/provider_catalog.rs
  • crates/jcode-base/src/provider_catalog_tests.rs
OpenAI-compatible runtime and catalog parsing
  • crates/jcode-provider-openrouter/src/lib.rs
  • crates/jcode-provider-openrouter-runtime/src/lib.rs
  • crates/jcode-provider-openrouter-runtime/src/models_catalog_parse.rs
  • crates/jcode-provider-openrouter-runtime/src/openrouter_catalog_merge_tests.rs
  • crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs
  • crates/jcode-provider-openrouter-runtime/src/openrouter_tests.rs
Provider diagnostics and TUI
  • crates/jcode-provider-doctor/src/live_provider_probes.rs
  • crates/jcode-tui/src/tui/ui_header.rs

Notes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the reference branch and commit with the provider metadata in crates/jcode-provider-metadata/src/catalog.rs, CLI setup in src/cli/provider_init.rs, and routing in crates/jcode-base/src/provider/. Run the listed runtime, authentication, catalog, TUI, and CLI tests plus the locked cargo build; done means SSYCloud login, routing, catalog handling, diagnostics, documentation, and regression checks work without credentials in the repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, authentication, cli, documentation, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.