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:
@@ -638,7 +638,7 @@ app.post('/refresh-token', async (req, res) => {
|
|||||||
app.get('/v1/models', async (req, res) => {
|
app.get('/v1/models', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
await ensureInitialized();
|
await ensureInitialized();
|
||||||
const account = accountManager.pickNext();
|
const { account } = accountManager.selectAccount();
|
||||||
if (!account) {
|
if (!account) {
|
||||||
return res.status(503).json({
|
return res.status(503).json({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|||||||
Reference in New Issue
Block a user