Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

fix(providers): remove the Auray provider (#1583) (#1590)

Tashfeen8dc8ec458e48
diff --git a/client/src/components/keys/shared.tsx b/client/src/components/keys/shared.tsx
index 1ae09376..585c5099 100644
--- a/client/src/components/keys/shared.tsx
+++ b/client/src/components/keys/shared.tsx
@@ -32,7 +32,6 @@ export function GetKeyLink({ url }: { url: string }) {
export const PLATFORMS: { value: Platform; label: string; url: string; keyless?: boolean; hidden?: boolean }[] = [
{ value: 'aclide', label: 'ACLIDE (shared monthly credits)', url: 'https://aclide.com/en/dashboard/api-keys' },
{ value: 'speka', label: 'Speka ($1 shared monthly credits)', url: 'https://speka.me/dashboard/keys' },
- { value: 'auray', label: 'Auray', url: 'https://app.auray.ai', hidden: true },
{ value: 'beatapi', label: 'BeatAPI (JEV decisions; temporary free offer)', url: 'https://beatapi.io' },
{ value: 'apinex', label: 'APINex (shared daily free chat and decisions)', url: 'https://apinex.bond/keys' },
{ value: 'typhoon', label: 'Typhoon (free research API)', url: 'https://playground.opentyphoon.ai' },
diff --git a/client/src/lib/routing.ts b/client/src/lib/routing.ts
index 09f88b9b..35d97feb 100644
--- a/client/src/lib/routing.ts
+++ b/client/src/lib/routing.ts
@@ -422,7 +422,6 @@ export const platformColors: Record<string, string> = {
sail: '#0ea5e9',
aclide: '#6366f1',
speka: '#0d9488',
- auray: '#635bff',
typhoon: '#e11d48',
plugsky: '#0284c7',
inferbase: '#2563eb',
diff --git a/client/src/pages/KeysPage.add-link.test.tsx b/client/src/pages/KeysPage.add-link.test.tsx
index 322a0457..9d131f94 100644
--- a/client/src/pages/KeysPage.add-link.test.tsx
+++ b/client/src/pages/KeysPage.add-link.test.tsx
@@ -57,7 +57,7 @@ it('opens Add key preselected from ?add= and clears the param', async () => {
expect(search()).toBe('')
})
-it('ignores an unknown or hidden provider', async () => {
+it('ignores an unknown or removed provider', async () => {
await mount('/keys?add=not-a-provider')
expect(dialog()).toBe('closed')
await mount('/keys?add=auray')
diff --git a/server/src/__tests__/db/migrate/remove-auray-provider.test.ts b/server/src/__tests__/db/migrate/remove-auray-provider.test.ts
new file mode 100644
index 00000000..56cc5d3d
--- /dev/null
+++ b/server/src/__tests__/db/migrate/remove-auray-provider.test.ts
@@ -0,0 +1,66 @@
+import Database from 'better-sqlite3';
+import { afterEach, describe, expect, it } from 'vitest';
+import { runMigrations } from '../../../db/migrate/runner.js';
+import { up, down } from '../../../db/migrations/20261019_000001_remove_auray_provider.js';
+
+// Auray started charging for API access and asked to be removed (#1583).
+
+const dbs: Database.Database[] = [];
+afterEach(() => {
+ for (const db of dbs.splice(0)) db.close();
+});
+
+async function migratedDb(): Promise<Database.Database> {
+ const db = new Database(':memory:');
+ dbs.push(db);
+ await runMigrations(db, 'up');
+ return db;
+}
+
+function aurayCounts(db: Database.Database) {
+ const count = (sql: string) => (db.prepare(sql).get() as { n: number }).n;
+ return {
+ keys: count("SELECT COUNT(*) AS n FROM api_keys WHERE platform = 'auray'"),
+ models: count("SELECT COUNT(*) AS n FROM models WHERE platform = 'auray'"),
+ embeddings: count("SELECT COUNT(*) AS n FROM embedding_models WHERE platform = 'auray'"),
+ chain: count("SELECT COUNT(*) AS n FROM fallback_config WHERE model_db_id IN (SELECT id FROM models WHERE platform = 'auray')"),
+ };
+}
+
+describe('remove_auray_provider migration (#1583)', () => {
+ it('removes Auray keys, models, embeddings and chain rows, keeps other providers, and DOWN restores them', async () => {
+ const db = await migratedDb();
+ // The state a Premium user upgrading from 0.16.3 has: an Auray key, its
+ // catalog models in the chain, and the Auray embedding row.
+ const keyId = Number(db.prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES ('auray', 'auray', 'enc', 'iv', 'tag', 'healthy', 1)
+ `).run().lastInsertRowid);
+ const modelId = Number(db.prepare(`
+ INSERT INTO models (platform, model_id, display_name, intelligence_rank, speed_rank, enabled, source)
+ VALUES ('auray', 'kimi-k3', 'Kimi K3', 20, 7, 1, 'catalog')
+ `).run().lastInsertRowid);
+ db.prepare('INSERT INTO fallback_config (model_db_id, priority, enabled) VALUES (?, 999, 1)').run(modelId);
+ db.prepare(`
+ INSERT INTO embedding_models (family, platform, model_id, display_name, dimensions, enabled)
+ VALUES ('qwen3-embedding-8b', 'auray', 'qwen3-embedding-8b', 'Qwen3 Embedding 8B', 4096, 1)
+ `).run();
+ db.prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES ('groq', 'groq', 'enc', 'iv', 'tag', 'healthy', 1)
+ `).run();
+ const otherModels = (db.prepare("SELECT COUNT(*) AS n FROM models WHERE platform != 'auray'").get() as { n: number }).n;
+
+ up(db);
+ expect(aurayCounts(db)).toEqual({ keys: 0, models: 0, embeddings: 0, chain: 0 });
+ expect(db.prepare("SELECT COUNT(*) AS n FROM api_keys WHERE platform = 'groq'").get()).toEqual({ n: 1 });
+ expect((db.prepare("SELECT COUNT(*) AS n FROM models WHERE platform != 'auray'").get() as { n: number }).n).toBe(otherModels);
+ expect(db.pragma('foreign_key_check')).toEqual([]);
+
+ down(db);
+ expect(aurayCounts(db)).toEqual({ keys: 1, models: 1, embeddings: 1, chain: 1 });
+ expect(db.prepare('SELECT id, status, enabled FROM api_keys WHERE platform = ?').get('auray'))
+ .toEqual({ id: keyId, status: 'healthy', enabled: 1 });
+ expect(db.prepare("SELECT value FROM settings WHERE key = 'migration_auray_removed_rows'").get()).toBeUndefined();
+ });
+});
diff --git a/server/src/__tests__/db/migrate/roundtrip.test.ts b/server/src/__tests__/db/migrate/roundtrip.test.ts
index f6805c37..8ae6b753 100644
--- a/server/src/__tests__/db/migrate/roundtrip.test.ts
+++ b/server/src/__tests__/db/migrate/roundtrip.test.ts
@@ -48,6 +48,7 @@ const DECISION_REQUESTS_FILENAME = '20261016_000001_decision_requests.ts';
const LLMTR_REENABLE_KEYS_FILENAME = '20261017_000001_llmtr_reenable_keys.ts';
const REMOVE_GITHUB_PROVIDER_FILENAME = '20261017_000002_remove_github_provider.ts';
const REQUEST_FAILURE_ATTRIBUTION_FILENAME = '20261017_233153_request_failure_attribution.ts';
+const REMOVE_AURAY_PROVIDER_FILENAME = '20261019_000001_remove_auray_provider.ts';
interface SchemaRow {
type: string;
@@ -142,6 +143,7 @@ describe('migration round trip', () => {
LLMTR_REENABLE_KEYS_FILENAME,
REMOVE_GITHUB_PROVIDER_FILENAME,
REQUEST_FAILURE_ATTRIBUTION_FILENAME,
+ REMOVE_AURAY_PROVIDER_FILENAME,
]);
} finally {
db.close();
diff --git a/server/src/__tests__/providers/auray.test.ts b/server/src/__tests__/providers/auray.test.ts
deleted file mode 100644
index 64bed24c..00000000
--- a/server/src/__tests__/providers/auray.test.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { afterEach, describe, expect, it, vi } from 'vitest';
-import { AurayProvider, AURAY_BASE_URL } from '../../providers/auray.js';
-import { getProvider } from '../../providers/index.js';
-import { AUTH_JSON_PROVIDER_MAP, parseKeysFromFile } from '../../lib/key-parser.js';
-import { supportedParametersFor } from '../../lib/sampling-params.js';
-
-const model = 'glm-5-3-flash';
-const json = (body: unknown, status = 200, headers = {}) => new Response(JSON.stringify(body), { status, headers });
-const completion = { id: 'test', object: 'chat.completion', created: 1, model,
- choices: [{ index: 0, message: { role: 'assistant', content: 'OK' }, finish_reason: 'stop' }],
- usage: { prompt_tokens: 3, completion_tokens: 1, total_tokens: 4 } };
-const frame = { id: 'test', object: 'chat.completion.chunk', created: 1, model,
- choices: [{ index: 0, delta: { role: 'assistant', content: 'OK' }, finish_reason: null }] };
-const sse = (frames: unknown[]) => new Response(': keepalive\n\n' + frames.map(x => `data: ${JSON.stringify(x)}\n\n`).join('') + 'data: [DONE]\n\n', { headers: { 'content-type': 'text/event-stream' } });
-
-describe('Auray catalog-only provider', () => {
- afterEach(() => vi.restoreAllMocks());
-
- it('registers the provider and explicit key import aliases', () => {
- expect(getProvider('auray')).toBeInstanceOf(AurayProvider);
- expect(getProvider('auray')!.keyless).toBe(false);
- expect(parseKeysFromFile('AURAY_API_KEY=auray_sk_test_only', 'keys.env').keys[0].platform).toBe('auray');
- expect(AUTH_JSON_PROVIDER_MAP.auray).toBe('auray');
- });
-
- it('does not advertise sampling controls that the provider ignores', () => {
- expect(supportedParametersFor('auray')).toEqual(['max_tokens', 'max_completion_tokens', 'stream', 'response_format', 'reasoning_effort']);
- expect(supportedParametersFor('auray', { tools: true })).toEqual(['max_tokens', 'max_completion_tokens', 'stream', 'response_format', 'reasoning_effort', 'tools', 'tool_choice']);
- });
-
- it.each([0, 50])('validates an authenticated account with %s credits without inference', async balance => {
- const fetch = vi.spyOn(global, 'fetch').mockResolvedValue(json({ plan: 'free', credits: { balance } }));
- expect(await new AurayProvider().validateKey('test-key')).toBe(true);
- expect(fetch.mock.calls[0][0]).toBe('https://api.auray.ai/v1/me');
- expect(fetch.mock.calls[0][1]?.method).toBe('GET');
- expect(new Headers(fetch.mock.calls[0][1]?.headers).get('authorization')).toBe('Bearer test-key');
- expect(fetch).toHaveBeenCalledTimes(1);
- });
-
- it.each([401, 403])('rejects authentication failures %s', async status => {
- vi.spyOn(global, 'fetch').mockResolvedValue(json({ error: { message: 'Invalid key' } }, status));
- await expect(new AurayProvider().validateKey('bad-key')).resolves.toMatchObject({ valid: false });
- });
-
- it.each([402, 429, 503])('keeps HTTP %s inconclusive and preserves Retry-After', async status => {
- vi.spyOn(global, 'fetch').mockResolvedValue(json({}, status, { 'Retry-After': '45' }));
- await expect(new AurayProvider().validateKey('test-key')).rejects.toMatchObject({ status, retryAfterMs: 45_000 });
- });
-
- it.each([{}, null, { plan: 'free', credits: { balance: '50' } }])('rejects malformed account responses', async body => {
- vi.spyOn(global, 'fetch').mockResolvedValue(json(body));
- await expect(new AurayProvider().validateKey('test-key')).rejects.toMatchObject({ status: 502 });
- });
-
- it('uses the compatibility endpoint, preserving options and usage', async () => {
- const fetch = vi.spyOn(global, 'fetch').mockResolvedValue(json(completion));
- const out = await new AurayProvider().chatCompletion('test-key', [{ role: 'user', content: 'Hi' }], model,
- { max_tokens: 256, reasoning_effort: 'minimal', response_format: { type: 'json_object' } });
- expect(fetch.mock.calls[0][0]).toBe(`${AURAY_BASE_URL}/chat/completions`);
- expect(new Headers(fetch.mock.calls[0][1]?.headers).get('authorization')).toBe('Bearer test-key');
- expect(JSON.parse(String(fetch.mock.calls[0][1]?.body))).toMatchObject({ model, max_tokens: 256, reasoning_effort: 'minimal', response_format: { type: 'json_object' } });
- expect(out.usage?.total_tokens).toBe(4);
- expect(out._routed_via).toEqual({ platform: 'auray', model });
- });
-
- it.each([{ ...completion, model: 'substitute' }, { ...completion, model: undefined }, { ...completion, choices: [] }, { error: { code: 'vendor_disabled' } }])('fails closed on mismatched/malformed HTTP 200', async body => {
- vi.spyOn(global, 'fetch').mockResolvedValue(json(body));
- await expect(new AurayProvider().chatCompletion('test-key', [], model)).rejects.toMatchObject({ status: 502 });
- });
-
- it('preserves HTTP rate-limit hints without retrying a paid request', async () => {
- const fetch = vi.spyOn(global, 'fetch').mockResolvedValue(json({ error: { message: 'Rate limited' } }, 429, { 'Retry-After': '45' }));
- await expect(new AurayProvider().chatCompletion('test-key', [], model)).rejects.toMatchObject({ status: 429, retryAfterMs: 45_000 });
- expect(fetch).toHaveBeenCalledTimes(1);
- });
-
- it('streams text, tools, reasoning and usage-only events', async () => {
- const tools = [{ index: 0, id: 'call_au_1', type: 'function', function: { name: 'test', arguments: '{}' } }];
- vi.spyOn(global, 'fetch').mockResolvedValue(sse([frame, { ...frame, choices: [{ index: 0, delta: { reasoning_content: 'reason', tool_calls: tools }, finish_reason: 'tool_calls' }] }, { ...frame, choices: [], usage: completion.usage }]));
- const chunks = [];
- for await (const c of new AurayProvider().streamChatCompletion('test-key', [], model)) chunks.push(c);
- expect(chunks[0].choices[0].delta.content).toBe('OK');
- expect(chunks[1].choices[0].delta.tool_calls?.[0].id).toBe('call_au_1');
- expect(chunks.at(-1)?.usage?.total_tokens).toBe(4);
- });
-
- it.each([[], [{ ...frame, model: 'other' }], [{ ...frame, choices: undefined }], [frame, { error: { code: 'vendor_disabled' } }]].map(frames => ({ frames })))('rejects empty, substituted or deferred-error streams', async ({ frames }) => {
- vi.spyOn(global, 'fetch').mockResolvedValue(sse(frames));
- await expect((async () => { for await (const _chunk of new AurayProvider().streamChatCompletion('test-key', [], model)) { /* drain */ } })()).rejects.toMatchObject({ status: 502 });
- });
-});
diff --git a/server/src/__tests__/routes/keys-providers-checklist.test.ts b/server/src/__tests__/routes/keys-providers-checklist.test.ts
index 2171a8c1..9e335ee8 100644
--- a/server/src/__tests__/routes/keys-providers-checklist.test.ts
+++ b/server/src/__tests__/routes/keys-providers-checklist.test.ts
@@ -81,15 +81,4 @@ describe('GET /api/keys/providers — provider checklist (#543)', () => {
expect(body.summary.configured).toBe(1);
expect(body.summary.unconfigured).toBe(body.summary.total - 1);
});
-
- it('stops suggesting an unlisted provider (Auray, #1563) but still shows it to a user who has a key', async () => {
- const before = await request(app, '/api/keys/providers');
- expect(before.body.providers.some((p: { platform: string }) => p.platform === 'auray')).toBe(false);
-
- addKey('auray');
- const after = await request(app, '/api/keys/providers');
- expect(after.body.providers.find((p: { platform: string }) => p.platform === 'auray'))
- .toMatchObject({ platform: 'auray', configured: true, keyCount: 1 });
- expect(after.body.summary.total).toBe(before.body.summary.total + 1);
- });
});
diff --git a/server/src/__tests__/services/auray-embeddings.test.ts b/server/src/__tests__/services/auray-embeddings.test.ts
deleted file mode 100644
index e8724f87..00000000
--- a/server/src/__tests__/services/auray-embeddings.test.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-import { getDb, initDb } from '../../db/index.js';
-import { encrypt } from '../../lib/crypto.js';
-import { EMBEDDING_PLATFORMS, runEmbeddings } from '../../services/embeddings.js';
-import { applyCatalog } from '../../services/catalog-sync.js';
-
-const model = 'qwen3-embedding-8b';
-const json = (body: unknown) => new Response(JSON.stringify(body));
-function seed() {
- const db = getDb(), secret = encrypt('auray-test-key');
- db.prepare("INSERT INTO api_keys (platform,label,encrypted_key,iv,auth_tag,status,enabled) VALUES ('auray','test',?,?,?,'healthy',1)").run(secret.encrypted, secret.iv, secret.authTag);
- const result = applyCatalog(db, { version: '2099.01.01', generatedAt: new Date().toISOString(), tier: 'live', models: [], quirks: [],
- embeddings: [{ platform: 'auray', modelId: model, family: 'auray-test', displayName: model, dimensions: 4096, maxInputTokens: 40960, priority: 1, enabled: true, quotaLabel: '50 monthly credits shared' }] });
- expect(result.skippedUnknownPlatform).toBe(0);
-}
-
-describe('Auray catalog-managed embeddings', () => {
- beforeEach(() => { process.env.ENCRYPTION_KEY = '0'.repeat(64); initDb(':memory:'); });
- afterEach(() => { vi.restoreAllMocks(); getDb().close(); });
-
- it('routes ordered fixed-width vectors with a cold-start timeout and usage', async () => {
- seed();
- const timeout = vi.spyOn(AbortSignal, 'timeout');
- const fetch = vi.spyOn(global, 'fetch').mockResolvedValue(json({ model, data: [{ index: 1, embedding: Array(4096).fill(0.2) }, { index: 0, embedding: Array(4096).fill(0.1) }], usage: { prompt_tokens: 6 } }));
- const result = await runEmbeddings('auray-test', ['first', 'second']);
- expect(EMBEDDING_PLATFORMS.has('auray')).toBe(true);
- expect(timeout).toHaveBeenCalledWith(180_000);
- expect(fetch.mock.calls[0][0]).toBe('https://api.auray.ai/openai/v1/embeddings');
- expect(new Headers(fetch.mock.calls[0][1]?.headers).get('authorization')).toBe('Bearer auray-test-key');
- expect(JSON.parse(String(fetch.mock.calls[0][1]?.body))).toEqual({ model, input: ['first', 'second'] });
- expect(result).toMatchObject({ platform: 'auray', modelId: model, dimensions: 4096, inputTokens: 6 });
- expect(result.vectors.map(v => v[0])).toEqual([0.1, 0.2]);
- });
-
- it.each([
- { model: 'other', data: [{ index: 0, embedding: Array(4096).fill(0.1) }] },
- { model, data: [] },
- { model, data: [{ index: 0, embedding: [0.1] }] },
- { model, data: [{ index: 0, embedding: Array(4096).fill(null) }] },
- { model, data: [{ index: 1, embedding: Array(4096).fill(0.1) }] },
- { error: { code: 'insufficient_credits' } },
- ])('rejects invalid model identity, vector dimensions or values', async body => {
- seed(); vi.spyOn(global, 'fetch').mockResolvedValue(json(body));
- await expect(runEmbeddings('auray-test', ['hello'])).rejects.toMatchObject({ status: 502 });
- });
-
- it('does not send an unsupported dimension override', async () => {
- seed(); const fetch = vi.spyOn(global, 'fetch');
- await expect(runEmbeddings('auray-test', ['hello'], 1024)).rejects.toThrow('dimension override');
- expect(fetch).not.toHaveBeenCalled();
- });
-
- it('preserves rate-limit retry hints', async () => {
- seed(); vi.spyOn(global, 'fetch').mockResolvedValue(new Response('rate limited', { status: 429, headers: { 'Retry-After': '45' } }));
- await expect(runEmbeddings('auray-test', ['hello'])).rejects.toMatchObject({ status: 429, retryAfterMs: 45_000 });
- });
-
- it('does not seed new models before the signed catalog arrives', () => {
- for (const table of ['models', 'embedding_models']) expect(getDb().prepare(`SELECT COUNT(*) AS n FROM ${table} WHERE platform='auray'`).get()).toEqual({ n: 0 });
- });
-});
diff --git a/server/src/__tests__/services/catalog-sync.test.ts b/server/src/__tests__/services/catalog-sync.test.ts
index bc994366..064d5bfa 100644
--- a/server/src/__tests__/services/catalog-sync.test.ts
+++ b/server/src/__tests__/services/catalog-sync.test.ts
@@ -253,6 +253,14 @@ describe('applyCatalog', () => {
expect(getDb().prepare("SELECT id FROM models WHERE platform = 'some-future-provider'").get()).toBeUndefined();
});
+ it('skips Auray rows a catalog still carries after the provider was removed (#1583)', () => {
+ const models = existingAsCatalogModels();
+ models.push(baseModel({ platform: 'auray', modelId: 'kimi-k3' }));
+ const counts = applyCatalog(getDb(), catalogOf(models));
+ expect(counts.skippedUnknownPlatform).toBeGreaterThanOrEqual(1);
+ expect(getDb().prepare("SELECT id FROM models WHERE platform = 'auray'").get()).toBeUndefined();
+ });
+
it('imports the new chat providers and keeps Speechify exclusively in audio', () => {
const models = existingAsCatalogModels();
models.push(baseModel({ platform: 'clod', modelId: 'test-clod' }));
diff --git a/server/src/__tests__/services/provider-quota.test.ts b/server/src/__tests__/services/provider-quota.test.ts
index fd298146..8fcfe35a 100644
--- a/server/src/__tests__/services/provider-quota.test.ts
+++ b/server/src/__tests__/services/provider-quota.test.ts
@@ -52,7 +52,6 @@ describe('provider-quota: pool inference', () => {
for (const model of ['first-model', 'another-model']) {
expect(inferQuotaPoolKey('aclide', model)).toBe('aclide::monthly-credit');
expect(inferQuotaPoolKey('speka', model)).toBe('speka::monthly-credit');
- expect(inferQuotaPoolKey('auray', model)).toBe('auray::monthly-credit');
expect(inferQuotaPoolKey('plugsky', model)).toBe('plugsky::fair-use');
expect(inferQuotaPoolKey('clod', model)).toBe('clod::daily-free');
expect(inferQuotaPoolKey('blaze', model)).toBe('blaze::daily-free');
diff --git a/server/src/db/migrate/defaults.ts b/server/src/db/migrate/defaults.ts
index b0ed517a..a41e5670 100644
--- a/server/src/db/migrate/defaults.ts
+++ b/server/src/db/migrate/defaults.ts
@@ -43,6 +43,7 @@ import * as decisionRequests from '../migrations/20261016_000001_decision_reques
import * as llmtrReenableKeys from '../migrations/20261017_000001_llmtr_reenable_keys.js';
import * as removeGithubProvider from '../migrations/20261017_000002_remove_github_provider.js';
import * as requestFailureAttribution from '../migrations/20261017_233153_request_failure_attribution.js';
+import * as removeAurayProvider from '../migrations/20261019_000001_remove_auray_provider.js';
export interface MigrationModule {
up(db: Db): void;
@@ -98,6 +99,7 @@ export const DECISION_REQUESTS_FILENAME = '20261016_000001_decision_requests.ts'
export const LLMTR_REENABLE_KEYS_FILENAME = '20261017_000001_llmtr_reenable_keys.ts';
export const REMOVE_GITHUB_PROVIDER_FILENAME = '20261017_000002_remove_github_provider.ts';
export const REQUEST_FAILURE_ATTRIBUTION_FILENAME = '20261017_233153_request_failure_attribution.ts';
+export const REMOVE_AURAY_PROVIDER_FILENAME = '20261019_000001_remove_auray_provider.ts';
export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: LEGACY_BASELINE_FILENAME, module: legacyBaseline },
@@ -144,4 +146,5 @@ export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: LLMTR_REENABLE_KEYS_FILENAME, module: llmtrReenableKeys },
{ filename: REMOVE_GITHUB_PROVIDER_FILENAME, module: removeGithubProvider },
{ filename: REQUEST_FAILURE_ATTRIBUTION_FILENAME, module: requestFailureAttribution },
+ { filename: REMOVE_AURAY_PROVIDER_FILENAME, module: removeAurayProvider },
];
diff --git a/server/src/db/migrations/20261019_000001_remove_auray_provider.ts b/server/src/db/migrations/20261019_000001_remove_auray_provider.ts
new file mode 100644
index 00000000..0f6d70bf
--- /dev/null
+++ b/server/src/db/migrations/20261019_000001_remove_auray_provider.ts
@@ -0,0 +1,91 @@
+// Migration: remove the Auray provider
+// Created: 2026-10-19
+//
+// DOWN: reversible (the removed rows are kept in settings)
+//
+// Auray started charging for API access and asked to be removed (#1583). The
+// adapter is gone, so these rows can never serve again: remove the keys,
+// models, embedding and media rows, model overrides, and the chain and profile
+// entries that point at the models. Request history keeps its 'auray' rows;
+// that is a record, not config. Same shape as the GitHub Models removal.
+
+import type { Db } from '../types.js';
+
+const PLATFORM = 'auray';
+const SETTING_KEY = 'migration_auray_removed_rows';
+
+type Row = Record<string, unknown>;
+
+// Insert order for DOWN: parents before the rows that reference them.
+const TABLES = ['api_keys', 'models', 'embedding_models', 'media_models', 'model_overrides', 'fallback_config', 'profile_models'] as const;
+type Table = (typeof TABLES)[number];
+
+function tableExists(db: Db, table: string): boolean {
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
+}
+
+function selectRows(db: Db, table: Table): Row[] {
+ if (!tableExists(db, table)) return [];
+ if (table === 'fallback_config' || table === 'profile_models') {
+ return db.prepare(`
+ SELECT * FROM ${table} WHERE model_db_id IN (SELECT id FROM models WHERE platform = ?)
+ `).all(PLATFORM) as Row[];
+ }
+ return db.prepare(`SELECT * FROM ${table} WHERE platform = ?`).all(PLATFORM) as Row[];
+}
+
+// Encrypted key columns may be BLOBs; JSON keeps them as tagged base64.
+function encode(row: Row): Row {
+ const out: Row = {};
+ for (const [k, v] of Object.entries(row)) {
+ out[k] = Buffer.isBuffer(v) ? { $buffer: v.toString('base64') } : v;
+ }
+ return out;
+}
+
+function decode(row: Row): Row {
+ const out: Row = {};
+ for (const [k, v] of Object.entries(row)) {
+ const tagged = v as { $buffer?: string } | null;
+ out[k] = tagged && typeof tagged === 'object' && typeof tagged.$buffer === 'string'
+ ? Buffer.from(tagged.$buffer, 'base64')
+ : v;
+ }
+ return out;
+}
+
+export function up(db: Db): void {
+ const removed: Partial<Record<Table, Row[]>> = {};
+ for (const table of TABLES) removed[table] = selectRows(db, table).map(encode);
+
+ // Children first: chain and profile rows reference models(id).
+ for (const table of ['fallback_config', 'profile_models'] as const) {
+ if (!tableExists(db, table)) continue;
+ db.prepare(`
+ DELETE FROM ${table} WHERE model_db_id IN (SELECT id FROM models WHERE platform = ?)
+ `).run(PLATFORM);
+ }
+ for (const table of ['models', 'embedding_models', 'media_models', 'model_overrides', 'api_keys'] as const) {
+ if (!tableExists(db, table)) continue;
+ db.prepare(`DELETE FROM ${table} WHERE platform = ?`).run(PLATFORM);
+ }
+
+ db.prepare(`
+ INSERT INTO settings (key, value) VALUES (?, ?)
+ ON CONFLICT(key) DO UPDATE SET value = excluded.value
+ `).run(SETTING_KEY, JSON.stringify(removed));
+}
+
+export function down(db: Db): void {
+ const row = db.prepare('SELECT value FROM settings WHERE key = ?').get(SETTING_KEY) as { value: string } | undefined;
+ const removed: Partial<Record<Table, Row[]>> = row ? JSON.parse(row.value) : {};
+ for (const table of TABLES) {
+ for (const raw of removed[table] ?? []) {
+ const r = decode(raw);
+ const cols = Object.keys(r);
+ db.prepare(`INSERT OR IGNORE INTO ${table} (${cols.join(', ')}) VALUES (${cols.map(() => '?').join(', ')})`)
+ .run(...cols.map(c => r[c]));
+ }
+ }
+ db.prepare('DELETE FROM settings WHERE key = ?').run(SETTING_KEY);
+}
diff --git a/server/src/lib/key-parser.ts b/server/src/lib/key-parser.ts
index 642a51e9..06261264 100644
--- a/server/src/lib/key-parser.ts
+++ b/server/src/lib/key-parser.ts
@@ -46,7 +46,6 @@ export interface ParseResult {
export const PREFIX_MAP: Record<string, string> = {
ACLIDE_: 'aclide',
SPEKA_: 'speka',
- AURAY_: 'auray',
BEATAPI_: 'beatapi',
APINEX_: 'apinex',
BEAT_API_: 'beatapi',
@@ -162,7 +161,6 @@ export const AUTH_JSON_PROVIDER_MAP: Record<string, string> = {
sail: 'sail',
aclide: 'aclide',
speka: 'speka',
- auray: 'auray',
beatapi: 'beatapi',
apinex: 'apinex',
serpsearch: 'serpsearch',
diff --git a/server/src/lib/sampling-params.ts b/server/src/lib/sampling-params.ts
index 20b78daa..17066392 100644
--- a/server/src/lib/sampling-params.ts
+++ b/server/src/lib/sampling-params.ts
@@ -439,12 +439,6 @@ export function platformDropsResponseFormat(platform: string): boolean {
export function supportedParametersFor(platform: string, caps: { tools?: boolean } = {}): string[] {
// Unlike the generic base set, Moondream has neither stop nor tools.
if (platform === 'moondream') return ['temperature', 'top_p', 'max_tokens', 'max_completion_tokens', 'stream', 'reasoning_effort'];
- // Auray accepts sampling knobs for client compatibility but does not apply
- // them. Advertise only controls its built-in models actually honor.
- if (platform === 'auray') return [
- 'max_tokens', 'max_completion_tokens', 'stream', 'response_format', 'reasoning_effort',
- ...(caps.tools ? ['tools', 'tool_choice'] : []),
- ];
const policy = PLATFORM_PARAM_POLICIES[platform as Platform];
const dropped = new Set<string>(policy?.drop ?? []);
const params = [
diff --git a/server/src/providers/auray.ts b/server/src/providers/auray.ts
deleted file mode 100644
index 5cc0906c..00000000
--- a/server/src/providers/auray.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import type { ChatCompletionChunk, ChatCompletionResponse, ChatMessage } from '@freellmapi/shared/types.js';
-import { parseStatedRetryMs, providerHttpError, type CompletionOptions, type KeyValidationResult } from './base.js';
-import { OpenAICompatProvider } from './openai-compat.js';
-import type { QuotaObservationContext } from '../services/provider-quota.js';
-
-export const AURAY_BASE_URL = 'https://api.auray.ai/openai/v1';
-
-function checkResponse(value: { model?: string; error?: unknown }, requested: string): void {
- // Deferred failures can arrive under HTTP 200 or after valid SSE chunks.
- // Never expose them (or an auto-routed substitute) as a successful answer.
- if (value.error) {
- const error = value.error as { code?: string; type?: string };
- const rateLimited = error.code === 'rate_limited' || error.type === 'insufficient_quota';
- throw Object.assign(new Error('Auray returned an upstream completion error'), {
- status: rateLimited ? 429 : 502,
- retryAfterMs: parseStatedRetryMs(value),
- });
- }
- if (value.model !== requested) {
- throw Object.assign(new Error('Auray returned a different or missing model identity'), { status: 502 });
- }
-}
-
-/** Free credits renew monthly and are shared across chat and embeddings.
- * Only the signed catalog decides which models qualify; no bundled seeds.
- * https://www.auray.ai/docs/clients/openai */
-export class AurayProvider extends OpenAICompatProvider {
- constructor() {
- super({ platform: 'auray', name: 'Auray', baseUrl: AURAY_BASE_URL,
- validateUrl: 'https://api.auray.ai/v1/me', timeoutMs: 180_000 });
- }
-
- protected override async validationResult(response: Response): Promise<KeyValidationResult> {
- if ([401, 403].includes(response.status)) return super.validationResult(response);
- if (!response.ok) throw providerHttpError(response, 'Auray key validation is temporarily inconclusive');
- const body = await response.json().catch(() => null) as { plan?: unknown; credits?: { balance?: unknown } } | null;
- if (typeof body?.plan !== 'string' || typeof body.credits?.balance !== 'number' || !Number.isFinite(body.credits.balance)) {
- throw Object.assign(new Error('Auray returned an invalid account response'), { status: 502 });
- }
- // An exhausted free wallet is still an authenticated key. /models is a
- // roster, not an authentication probe; /me never generates paid tokens.
- return true;
- }
-
- override async chatCompletion(apiKey: string, messages: ChatMessage[], modelId: string,
- options?: CompletionOptions, quotaContext?: QuotaObservationContext): Promise<ChatCompletionResponse> {
- const response = await super.chatCompletion(apiKey, messages, modelId, options, quotaContext);
- checkResponse(response, modelId);
- if (!Array.isArray(response.choices) || response.choices.length === 0 || response.choices.some(c => !c.message)) {
- throw Object.assign(new Error('Auray returned a malformed completion'), { status: 502 });
- }
- return response;
- }
-
- override async *streamChatCompletion(apiKey: string, messages: ChatMessage[], modelId: string,
- options?: CompletionOptions, quotaContext?: QuotaObservationContext): AsyncGenerator<ChatCompletionChunk> {
- let identified = false;
- for await (const chunk of super.streamChatCompletion(apiKey, messages, modelId, options, quotaContext)) {
- checkResponse(chunk, modelId);
- if (!Array.isArray(chunk.choices) || chunk.choices.some(c => !c.delta)) {
- throw Object.assign(new Error('Auray returned a malformed stream event'), { status: 502 });
- }
- identified = true;
- yield chunk;
- }
- if (!identified) throw Object.assign(new Error('Auray returned an empty stream'), { status: 502 });
- }
-}
diff --git a/server/src/providers/index.ts b/server/src/providers/index.ts
index 8bf9356d..8e903207 100644
--- a/server/src/providers/index.ts
+++ b/server/src/providers/index.ts
@@ -37,7 +37,6 @@ import { AirforceProvider } from './airforce.js';
import { DreamPromptingProvider } from './dreamprompting.js';
import { WaterfallProvider } from './waterfall.js';
import { LogfareProvider } from './logfare.js';
-import { AurayProvider } from './auray.js';
import { BeatApiProvider } from './beatapi.js';
import { ApinexProvider } from './apinex.js';
import { SerpSearchProvider } from './serpsearch.js';
@@ -84,7 +83,6 @@ register(new LlmtrProvider());
register(new GizmoProvider());
register(new BlockRunProvider());
register(new MoondreamProvider());
-register(new AurayProvider());
register(new BeatApiProvider());
register(new ApinexProvider());
register(new SerpSearchProvider());
diff --git a/server/src/routes/keys.ts b/server/src/routes/keys.ts
index 7f921593..9ab16d39 100644
--- a/server/src/routes/keys.ts
+++ b/server/src/routes/keys.ts
@@ -42,18 +42,18 @@ export const keysRouter = Router();
// existing keys still work if the catalog re-enables them. The setup
// checklist stops suggesting them to anyone who has no key yet; the dashboard
// pickers hide them through `hidden` in client/src/components/keys/shared.tsx.
-// Auray: free accounts locked and API access charged (#1563).
-const UNLISTED_PLATFORMS = new Set<string>(['auray']);
+// Empty since Auray was removed outright (#1583).
+const UNLISTED_PLATFORMS = new Set<string>();
// Active providers — must match providers/index.ts registrations + shared/types.ts Platform.
// Moonshot and MiniMax direct integrations were dropped in V4. HuggingFace
// was dropped in V4 and re-added in V13 via the router.huggingface.co route.
// SambaNova was dropped in V23 (free tier permanently retired). GitHub Models
-// was dropped after its retirement on 30 July 2026 (#1557).
+// was dropped after its retirement on 30 July 2026 (#1557). Auray was removed
+// at the provider's request after it started charging for API access (#1583).
const PLATFORMS = [
'aclide',
'speka',
- 'auray',
'typhoon',
'plugsky',
'inferbase',
diff --git a/server/src/services/embeddings.ts b/server/src/services/embeddings.ts
index fdccd7af..63f6d203 100644
--- a/server/src/services/embeddings.ts
+++ b/server/src/services/embeddings.ts
@@ -20,7 +20,6 @@ import type { Db } from '../db/types.js';
import { SPEKA_BASE_URL } from '../providers/speka.js';
import { ELECTRONHUB_BASE_URL } from '../providers/electronhub.js';
import { INFERBASE_BASE_URL } from '../providers/inferbase.js';
-import { AURAY_BASE_URL } from '../providers/auray.js';
import { LLMTR_BASE_URL } from '../providers/llmtr.js';
export interface EmbeddingModelRow {
@@ -120,7 +119,6 @@ export const EMBEDDING_PLATFORMS = new Set([
'speka',
'electronhub',
'inferbase',
- 'auray',
'llmtr',
]);
@@ -165,7 +163,7 @@ async function openAiStyleEmbed(
usage?: { prompt_tokens?: number; total_tokens?: number };
};
const data = [...(j.data ?? [])].sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
- if (['electronhub', 'inferbase', 'auray', 'llmtr'].includes(platform) && (
+ if (['electronhub', 'inferbase', 'llmtr'].includes(platform) && (
j.model !== modelId || data.length !== inputs.length ||
data.some((d, i) => d.index !== i || !Array.isArray(d.embedding) ||
d.embedding.length !== (dimensions ?? expectedDimensions) ||
@@ -173,7 +171,7 @@ async function openAiStyleEmbed(
)) {
// A successful HTTP response is not enough: wrong model/dimension or
// malformed vectors would corrupt the caller's embedding family.
- const provider = platform === 'electronhub' ? 'ElectronHub' : platform === 'auray' ? 'Auray' : platform === 'llmtr' ? 'LLMTR' : 'Inferbase';
+ const provider = platform === 'electronhub' ? 'ElectronHub' : platform === 'llmtr' ? 'LLMTR' : 'Inferbase';
throw new EmbeddingsError(`${provider} returned mismatched or malformed embeddings`, 502);
}
return {
@@ -297,13 +295,6 @@ async function callProvider(row: EmbeddingModelRow, credential: ProviderCredenti
throw new EmbeddingsError('LLMTR does not support an embedding dimension override', 400);
}
return openAiStyleEmbed(`${LLMTR_BASE_URL}/embeddings`, row.platform, key, row.model_id, inputs, {}, undefined, row.dimensions);
- case 'auray':
- // Auray documents fixed-width vectors, not Matryoshka truncation. A cold
- // request can take longer than the generic 30-second embedding deadline.
- if (dimensions !== undefined && dimensions !== row.dimensions) {
- throw new EmbeddingsError('Auray does not support an embedding dimension override', 400);
- }
- return openAiStyleEmbed(`${AURAY_BASE_URL}/embeddings`, row.platform, key, row.model_id, inputs, {}, undefined, row.dimensions, 180_000);
case 'cloudflare': {
// Key is stored as "account_id:token".
const sep = key.indexOf(':');
diff --git a/server/src/services/provider-quota.ts b/server/src/services/provider-quota.ts
index 20f2eeb0..6038ba87 100644
--- a/server/src/services/provider-quota.ts
+++ b/server/src/services/provider-quota.ts
@@ -118,9 +118,6 @@ export function inferPoolForPlatform(platform: Platform, modelId?: string | null
if (platform === 'sail') return 'sail::monthly-credit';
if (platform === 'aclide') return 'aclide::monthly-credit';
if (platform === 'speka') return 'speka::monthly-credit';
- // Auray: free credits renew monthly and are one wallet shared across chat
- // and embeddings (see providers/auray.ts), so one pool for the account.
- if (platform === 'auray') return 'auray::monthly-credit';
if (platform === 'apinex') return 'apinex::daily-free';
if (platform === 'plugsky') return 'plugsky::fair-use';
if (platform === 'inferbase') return 'inferbase::managed-free';
@@ -187,7 +184,6 @@ function isSharedPool(platform: Platform): boolean {
if (platform === 'apinex') return true;
if (platform === 'aclide') return true;
if (platform === 'speka') return true;
- if (platform === 'auray') return true;
if (platform === 'plugsky') return true;
if (platform === 'inferbase' || platform === 'simplellm') return true;
if (['electronhub', 'experiential', 'router9', 'septor', 'clod', 'speechify', 'blaze', 'lucidity', 'airforce', 'dreamprompting', 'waterfall', 'logfare'].includes(platform)) return true;
diff --git a/shared/types.ts b/shared/types.ts
index 8955655c..0ee314bc 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -72,8 +72,6 @@ export type Platform =
| 'aclide'
// OpenAI-compatible chat and embeddings; one shared $1 monthly allowance.
| 'speka'
- // Built-in chat and embeddings share free monthly credits; catalog only.
- | 'auray'
// Decision-only JEV adapter; promotional availability is catalog-managed.
| 'beatapi'
// Free-category chat and decisions share one weighted daily allowance.