import { BrainSpec, type BrainSuppliesCreds } from 'rhachet/brains'; /** * .what = atom config type * .why = shared type for model configs */ export type BrainAtomConfig = { model: string; description: string; spec: BrainSpec; }; /** * .what = credential keys required by fireworks ai * .why = enables type-safe credential lookup via rhachet's BrainSuppliesCreds */ export type CredsFireworks = { FIREWORKS_API_KEY: string; }; /** * .what = supplies for fireworks brain supplier * .why = enables credential injection via keyrack shorthand or explicit getter * * .patterns: * - keyrack shorthand: { keyrack: { owner: 'ehmpath', env: 'prod' } } * - explicit getter: () => Promise<{ FIREWORKS_API_KEY: string }> */ export type BrainSuppliesFireworks = { creds: BrainSuppliesCreds; }; /** * .what = version-pinned fireworks ai atom slugs — the CANONICAL names * .why = enables a caller to pin an exact model version, so a provider's * version churn cannot move the weights under them * * .shape = `fireworks/{family}/{tier}/{version}` * * the tier is its own segment, so a pin and its generic are peers that * differ by one word: * * fireworks/deepseek/flash/v4.1 <- this exact version * fireworks/deepseek/flash/latest <- whichever version is current * * it also lets tier tell two models apart where a suffix used to: * `glm/pro/5.3` and `glm/flash/5.3` are one release in two tiers. * * .note = this union is the CANONICAL set, never the ACCEPTED set. a caller may * also name a versionless or a pre-tier slug, and `slug/AtomSlug.ts` * is the root that maps all three forms — read it first. * * .note = every slug below was verified by a LIVE chat completion on * 2026-09-22. a catalog read is not evidence of serve-ability — three * ids that the catalog returned as available answered 404 on * inference on 2026-09-16. only a real call proves a model serves. * * .note = slugs dropped on 2026-09-16, each for a live 404: * - `fireworks/qwen/3.7-plus` — `qwen3p7-plus` 404s; catalog lists it * - `fireworks/minimax/2.7` — `minimax-m2p7` 404s; catalog lists it * - `fireworks/gpt-oss/20b` — `gpt-oss-20b` 404s; absent from catalog * * .note = `fireworks/glm/5.1` was dropped earlier: pay-per-token for GLM-5.1 was * deprecated effective 2026-08-07, so its id 404s on serverless. it * remains on provisioned throughput only, which this package does not * target. a deprecation is never fixable by a re-pin. * * .note = five of these carry a retirement (`RETIREMENT_BY_ATOM_SLUG`). they * stay in this union and keep their config, because a live probe on * 2026-09-22 found that every one of them still serves. a retirement is * an ANNOUNCEMENT, and to drop a slug on the announcement would break a * caller whose model still answers. */ export type BrainAtomSlugFireworksPinned = 'fireworks/deepseek/pro/v4' | 'fireworks/deepseek/flash/v4.1' | 'fireworks/deepseek/flash/v4' | 'fireworks/kimi/pro/k3' | 'fireworks/kimi/code/k2.7' | 'fireworks/kimi/pro/k2.6' | 'fireworks/glm/pro/5.3' | 'fireworks/glm/flash/5.3' | 'fireworks/glm/pro/5.2' | 'fireworks/minimax/flash/m3' | 'fireworks/gpt-oss/flash/120b' | 'fireworks/nemotron/flash/3.5'; /** * .what = model configuration by slug * .why = maps slugs to api model names, descriptions, and specs * * .note = on `cache.get` — fireworks bills a cached prompt token at a REDUCED, * per-model rate, never at zero. the discount is not uniform: it spans * ~3% of the input rate (deepseek flash) to ~20% (kimi-k2.7-code, * minimax-m3). so each model carries its own cited figure, and a `$0` * here would be a placeholder, not a measurement. * * .note = on `cache.set` — fireworks publishes NO cache-write rate and its rate * table holds no write column; a prompt cache fills as a side effect of * the read path. so `set: $0` is verified, not a placeholder. * `tokens.cache.set` stays 0 for the same reason: the api returns no * write count to bill. * * .note = rates below are the STANDARD tier, which is what a plain serverless * call receives. the Priority and Fast tiers cost more, and this * package requests neither. * * .note = `context.tokens` is the exact `context_length` the models api * reports, never a rounded vendor-page figure. so 1_048_576 rather * than "1M", 262_144 rather than "256K". * * .note = `cost.time` values are ESTIMATES, not measurements. they order the * models by rough throughput; they are not benchmarks. * * .note = `gain.cutoff` holds the fireworks deploy date, which is an UPPER * bound on the model's knowledge cutoff. the true cutoff is * unpublished for every model here, and a guess would read as a fact. * * .sources: * - rates: https://docs.fireworks.ai/serverless/pricing (read 2026-09-16) * - prompt cache: https://docs.fireworks.ai/guides/prompt-caching * - models: https://api.fireworks.ai/inference/v1/models (read 2026-09-16) * - api docs: https://docs.fireworks.ai/reference/chat-completions-1 * - benchmarks: https://benchlm.ai/benchmarks/sweVerified */ export declare const CONFIG_BY_ATOM_SLUG: Record;