fix: replace pickNext() with selectAccount() in /v1/models endpoint

Fixes regression where /v1/models returned 500 error because
pickNext() method was removed in v2.2.x refactor.

Fixes #164

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Badri Narayanan S
2026-01-20 21:03:03 +05:30
parent b0c3a61130
commit c8fbf37be9

View File

@@ -638,7 +638,7 @@ app.post('/refresh-token', async (req, res) => {
app.get('/v1/models', async (req, res) => {
try {
await ensureInitialized();
const account = accountManager.pickNext();
const { account } = accountManager.selectAccount();
if (!account) {
return res.status(503).json({
type: 'error',