Adds the Desktop-exclusive Preview models and the Xiaomi account-session
route to the existing xiaomi-mimo provider instead of a separate
xiaomi-desktop provider, so the dashboard shows one MiMo entry rather than
three overlapping ones.
Dual auth, same pattern as kimi — API key (sk-) covers the cloud API,
Desktop/OAuth adds the account session used by the Preview models:
- registry: category oauth, authModes [oauth, apikey], oauth block, the two
mimo-x-*-preview models, and the invite signupUrl
- executor: routes Preview models to the account-service route with a Cookie
session, everything else keeps the sourceFormat-matched transport
- oauth: custom ECDH encrypted-callback flow (X25519 -> SHA256 -> AES-256-GCM)
with a loopback callback proxy, plus one-click import of the local Desktop
auth.json
- usage: weekly quota from the account session
Fixes found while merging:
- the OAuth browser flow was dead: poll-status cleared the session before the
client could POST /exchange, so every exchange returned 400
- a Claude-format client was sent to /v1/chat/completions instead of the
declared /anthropic/v1/messages transport, because buildUrl ignored
runtimeTransport
- stopXiaomiMimoProxy leaked every pending session (each holding an X25519
private key) for the process lifetime
- the OAuth exchange did not persist the Desktop passToken, so the Preview
models could never work after a browser sign-in
Removes dead code: the local engine token minting (mimoEngine, never called
on the request path), the model-catalog and usage routes, engineToken/
engineUrl plumbing, and an unread top-level usage block.
Adds tests/unit/xiaomi-mimo-{executor,oauth-session,oauth-proxy}.test.js —
the provider previously had none.
104 lines
1.3 KiB
Plaintext
104 lines
1.3 KiB
Plaintext
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
|
|
# dependencies
|
|
/node_modules
|
|
/.pnp
|
|
.pnp.*
|
|
.yarn/*
|
|
!.yarn/patches
|
|
!.yarn/plugins
|
|
!.yarn/releases
|
|
!.yarn/versions
|
|
|
|
# testing
|
|
/coverage
|
|
|
|
# next.js
|
|
/.next/
|
|
/.next-cli-build/
|
|
/out/
|
|
cli/.build-home/
|
|
product
|
|
# production
|
|
/build
|
|
.idea/
|
|
|
|
# misc
|
|
.DS_Store
|
|
*.pem
|
|
|
|
# debug
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
.pnpm-debug.log*
|
|
|
|
# env files (can opt-in for committing if needed)
|
|
.env*
|
|
!.env.example
|
|
|
|
# vercel
|
|
.vercel
|
|
|
|
# typescript
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|
|
|
|
.bin/*
|
|
data/
|
|
logs/*
|
|
source/*
|
|
.cursor/*
|
|
docs/*
|
|
!docs/ARCHITECTURE.md
|
|
test/*
|
|
open-sse/test/*
|
|
RM.vn.md
|
|
RM.md
|
|
cursor/*
|
|
PUBLIC.md
|
|
Thanks.md
|
|
PUBLIC.en.md
|
|
PR/*
|
|
package-lock.json
|
|
|
|
|
|
#Ignore vscode AI rules
|
|
.github/instructions/codacy.instructions.md
|
|
README1.md
|
|
deploy*.sh
|
|
ecosystem.config.*
|
|
|
|
scripts/agSniffer/*
|
|
gitbooks/*
|
|
gitbook/README.md
|
|
|
|
# Refactor backup reference (do not bundle/lint)
|
|
open-sse.old/
|
|
.graphifyignore
|
|
graphify-out/*
|
|
|
|
# Local-only working dirs (notes, vendored repos, scripts, skills)
|
|
.claude/
|
|
.docs/
|
|
.repo/
|
|
.script/
|
|
.codegraph/
|
|
.PR/
|
|
.next-analyze/*
|
|
|
|
# Kiro local workspace state
|
|
.kiro/
|
|
9router-*
|
|
|
|
# Local sensitive / temp files
|
|
.engine-token.txt
|
|
.tmp-prov.json
|
|
.tmp-providers.json
|
|
.oauth-session.json
|
|
.dev-server.log
|
|
.dev-server-err.log
|
|
.start-dev.ps1
|
|
start-dev-silent.cjs
|
|
debug.log
|