Skip to content

Providers

Wijanarko Putra Rajeb edited this page Nov 9, 2026 · 12 revisions

Providers

Provider Settings — the flow, and what each control actually writes

  • The panel lists every provider omp KNOWS, including the ones with no credential. mergeProviders (src/server/lib/models/provider-registry.server.ts) unions four sources — get_login_providers (all of them, authenticated or not), models.yml, config.yml disabledProviders, and the CLI model catalog — and groupProviders (provider-settings/groups.ts) draws them in omp's own three sections: Signed in, Not signed in (hint: "pick one to sign in or add its key"), Disabled. Filtering the unauthenticated ones out — which this panel did — made an OAuth provider that had never been signed in unreachable from the panel that signs it in. Each row carries a status dot whose tone is the state (success/warning/muted) and whose title says WHERE the credential comes from, plus a model count; a provider that serves models but appears in neither source (a keyless local endpoint omp discovered) gets a row of its own from the catalog (catalogProviderItem), because its models reach the chat picker.

  • There is one button per thing the provider can DO, and it can be TWO (connectOffers, shared/lib/models/provider/origin.ts). The two facts are independent: omp's /login can sign it in, and it has a models.yml entry the editor writes. Collapsing them into one control made whichever lost unreachable — measured on an Anthropic override pointing at a proxy, which is BOTH and could only be edited (its sign-in flow had no button at all). So sign in (labelled sign in again once a login credential is stored) and edit are drawn separately, each routing to its own dialog; a file key that would shadow the login removes the sign-in button (credentialOrigin === 'models.yml'), because omp resolves the entry first and a login there would be stored and then ignored. A provider omp merely DISCOVERED offers neither: the disabled button carries the reason ("its models come from its own endpoint, so there is no login flow and no entry to edit"), where offering the editor produced a dialog that refused with "add the provider first". Verified in a browser against a temp agent dir: anthropic (entry + auth: oauth) rendered sign in + edit, gateway (entry only) rendered edit alone, GitHub Copilot (login only) sign in alone, and web (discovered) the disabled connect with that sentence; the editor opened prefilled from the file (https://proxy.example.com, anthropic-messages, oauth). auth-section.test.tsx pins the button sets and that each press routes to its own kind.

  • The credential ORIGIN is a field, not an inference (credential-origin.server.ts). get_login_providers answers only authenticated, so the origin is assembled from the stores omp itself reads — one scan of agent.db for the whole list (never one per provider: this panel asks about ~97) plus the models.yml key set — and folded to models.yml | login | api-key | environment. That fold is what makes sign out honest: it is offered only for the two values that live in omp's credential store (canSignOut), because an environment variable has nothing on disk and a models.yml key is removed by clearing the field in the entry editor.

  • disable and disconnect were the same operation, and disconnect is GONE. Both called setProviderEnabled, which writes config.yml disabledProviders, and only their toasts differed — two names for one write. Hiding a provider is disable (the credential stays, which is why re-enabling is instant); removing a credential is sign out.

  • Editing a models.yml entry is its own route (PUT /api/settings/provider-entry → updateOmpProviderEntry, omp/config/provider-entry.ts). The panel's "Save & Reconnect" wrote Kabmo's SQLite overlay, which the registry merge DISCARDS for any slug models.yml owns (applyStoredOverrides carries per-model state only) — so a rotated key or a moved endpoint was stored where nothing reads it, omp kept using the old credential, and a reload reverted the display. The patch is explicit: a field present is SET, null or an empty string REMOVES it, an absent field is left alone. Comments survive (document model), a masked placeholder is REFUSED rather than persisted over a working key, auth: apiKey is deleted rather than pinned (it is omp's default), and the result is validated against omp's rules before disk. A removal that would leave a models-carrying entry without a credential is refused with omp's own sentence. Verified end to end against a temp agent dir: rotating baseUrl + apiKey rewrote exactly those two lines, kept the file's comment, and the panel read the new endpoint back.

  • refresh and import are two different intents, and the panel used to have one button for both. refresh asks OMP to re-run discovery (omp models refresh → POST /api/settings/providers/refresh → refreshModelCatalog): it re-mints !command credentials, updates the catalog the chat picker reads, and is CATALOG-WIDE because that is the only granularity omp offers (the RPC has no refresh command; ModelRegistry.refreshProvider is internal) — the toast says so instead of implying per-provider discovery. import probes the provider's own endpoint and writes the ids into models.yml; it is blocked, with the reason on the button, for a provider whose list omp owns (a discovery entry), because a snapshot beside a live list is the drift overrideOnly exists to prevent.

  • Delete is one click on the row and one confirmation dialog, and it says what disappears. The row's button is offered only where something CAN go (providerDeletable: a models.yml entry or a Kabmo overlay row); the detail pane's is disabled with that reason. The server REFUSES a delete that would remove nothing and names why (an environment credential, a discovered provider) — answering success for it was the delete-that-did-nothing bug. DeleteProviderModal states the case: a file entry goes with its model list and the masked endpoint/key, a Kabmo-only row goes while omp keeps the provider, and a login credential is never touched by either.

  • sign out still drives omp's real removal (get_logout_accounts + logout via POST /api/settings/providers/logout), addressed by (providerId, credentialId) — which is why the accounts must be read first. The dialog states what survives, and an empty account list explains itself instead of reading as "nothing is configured".

  • The list header carries TWO controls, and the first read has its own spinner. refresh (beside add) re-reads the merged registry — the panel already re-reads on the models signal, but that one only covers what a provider WRITE produces, so a second instance, a hand edit of models.yml or a login finished in another tab move the list with no signal here. It reports what it did (Provider list refreshed — N providers.), spins while in flight, refuses a second press, and keeps the current selection when it still exists (a refresh that jumped to the first provider would throw away the row being read). The FIRST read draws a role="status" spinner with Reading providers… and the header reads Loading… instead of 0 providers — a zero over a spinner reads as a result rather than as a wait. A refresh never blanks the rows: stale-while-revalidate, so the button spins and the list stays.

  • A provider row is a PLATE, a NAME and a COUNT — nothing else. The mark was an <svg> for a brand but a TEXT-WIDTH pill for the initials fallback, so every row's name began at a different x; the layout is therefore a fixed 22px plate (IconPlate, a rounded rectangle so a pill and a square occupy one box), a name that takes the slack (flex-1 min-w-0 truncate), and a fixed 32px right-aligned tabular-nums count. Verified: all 97 rows share one key — plate x=377 w=22, count x=574 right edge 606, width 32 — so the digits are comparable down the column. A status dot and a per-row delete button were both removed, and neither is a layout loss. The dot repeated the state the SECTION already names (Signed in / Not signed in / Disabled) three times per screen, and a colour with no label is the one thing a reader cannot look up; the row's title still spells the state out (providerStatusLabel). The delete button put a trash icon on every row, mostly invisible until hover, and cost the count column its alignment on the rows where it did not apply — deleting is a decision about ONE provider, taken after reading what disappears, so it lives in the detail pane's delete (and the DeleteProviderModal it opens). The detail header is the same fix in the other direction: the name and slug are ONE column beside the plate, because the stacked form aligned the slug with a hard-coded pl-8 that only matched while the mark was exactly 32px wide (measured: both now at x=694.5). layout.test.tsx pins the geometry (plate box, flex-1 name, fixed slots, the reserved delete slot on a non-deletable row, the shared header column), so a restyle cannot quietly reintroduce the drift.

  • The mark is BOUNDED inside the plate, and the initials fallback is why. That fallback is a PILL whose width follows its text — correct beside a name (the composer picker, the preset list) and wrong in a fixed box: measured in the list, ab. at the unbounded 1.2x font came out ~25px wide inside a 20px content box and spilled past the plate's rounded edge. ProviderIcon therefore takes bounded, which turns the badge into a square of exactly size (overflow-hidden, centred, font derived from the initials' own length — 3 characters ab./ti. are the widest providerInitials can produce, so 0.64×; 2 characters 0.82×), and the SVG half declares display:block because an inline svg sits on the text baseline and adds descender space — it can "fit" its width/height attributes and still push the plate's edge. IconPlate passes it (inset 12% per side, so a 22px plate holds a 16px mark and a 30px plate a 22px one) and also sets overflow-hidden as a second line of defence. Verified in Chromium across 98 plates (97 rows + the detail header) in both a light and a dark palette: 0 overflow, 2px slack per side for every SVG, every initials badge scrollWidth === clientWidth, and no badge wider than its own box (ab./kj. at 10px font in a 16px box). The four dialogs opened from the header (sign in, edit connection, delete, sign out) draw the same plate at 26px so the mark cannot be a different size in the dialog than in the row that opened it. layout.test.tsx pins the bounded box, the per-length font, the svg's display:block and the header plate's size.### Provider Models — where the list comes from

Provider Models — where the list comes from

  • The model list is omp models --json --kind all, not get_available_models. The RPC answers CHAT models only (modelRegistry.getAvailable() defaults to kind chat), so an embedding, image, judge, tts, stt, search, rerank or video model could not be listed at all — and the row's own kind, thinking, input and cost were dropped, which is why every model read hasVision: false / hasTools: true whatever omp knew. catalog.server.ts reads the CLI (cached a minute on globalThis, dropped by invalidateModelsCaches) and providerModels unions it with the models.yml entries: a catalog row wins for the same id, and a registered id the catalog does not serve is KEPT (a lapsed credential is not a deletion). The model list draws kind tabs from the rows themselves, so a tab appears exactly when the provider has one.

  • The capability dialog states only what omp reports. It used to list five capabilities and hardcode two of them as "Supported" for every model on earth ("Structured Output", "Streaming") — a claim the panel cannot make. A row is now a field of the model's own record (input, thinking, kind, supportsTools), and an unreported field reads — rather than "not supported", because absence in a catalog is not a denial.

  • PROVIDER_APIS is omp's whole ApiSchema (13 values, including openai-decisions and workers-ai-systemone), and PROVIDER_THINKING_MODES / MODEL_KINDS live beside it. A value here that omp does not know makes it disable EVERY custom provider in the file, so the writer and the validator read the same tables.

  • A failed catalog read is REPORTED, never substituted. GET /api/settings/providers carries catalogError and the sidebar prints it above the list: the provider rows come from other sources and stay usable, and an empty model list with no explanation reads as "this provider serves nothing".

  • A models.yml write is invisible to the readers until they are recycled. The pooled omp utility child loads the registry when it is SPAWNED and get_available_models never compares the file's mtime, so dropping Kabmo's cache alone answered the OLD list from that child — measured: adding a provider only appeared after omp restarted. Every settings write now goes through refreshModelRegistryAfterWrite (src/server/lib/models/registry-refresh.server.ts), which recycles the pool, forgets the probes for every harness that reads the written FILE (harnessesSharingRegistry — omp-rpc and omp-acp share one models.yml), re-probes when the write changes what an agent lists, and invalidates the caches last so the models topic cannot cache the pre-write answer for another minute. A per-model override passes probes: false because it changes metadata, not the model set.

Provider Dialects (Settings → Providers, "Add Model Provider")

  • A provider is three models.yml fields, and the settings UI now offers all three. api is the wire dialect (omp's own ApiSchema, 11 values), auth is apiKey | none | oauth, and discovery lets OMP list the models itself. src/shared/lib/models/provider/dialect.ts owns the value lists and the guards; the picker (DialectFields.tsx), the writer, and the validator all read from it, so a value omp rejects cannot be offered. The lists are data, never a chain of ifs at a call site — a dialect is a row there, and PROVIDER_APIS is asserted against the shipped presets in provider/presets.test.ts.

  • Why this exists: the previous dialog could only write "OpenAI-compatible + Bearer + apiKey + fetch /models". An Anthropic-shaped proxy was therefore unreachable (it answers x-api-key, and a Bearer probe 401s in a way that reads as a bad key), a keyless local server was rejected as unconfigured, and a provider omp already bundles got a duplicate model list written under it. The listing probe now follows the DIALECT — openai-completions/openai-responses send Authorization: Bearer, anthropic-messages sends x-api-key + anthropic-version, google-generative-ai puts the key in ?key=, azure-openai-responses sends an api-key header with api-version=v1 (omp's own DEFAULT_AZURE_API_VERSION) — and only an unclassified endpoint falls back to trying the three styles in order. Verified against a header-recording stub: each dialect produced exactly its own header.

  • Three provider shapes, and the writer treats them differently (upsertOmpProviderModels, src/server/lib/omp/config/providers.ts; model-entry helpers split into provider-seeds.ts):

    • full — models non-empty; baseUrl plus an apiKey unless auth: none/oauth.
    • discovery — registered with discovery: { type } and an EMPTY model list. Writing ids as well would freeze a snapshot omp would then serve alongside its own live discovery. Verified: omp models refresh <slug> on such an entry returns the models from the endpoint.
    • override — overrideOnly, no model ids at all. This is the documented "override-only provider": omp keeps its own catalog models and only the endpoint changes. Verified: anthropic: {baseUrl, apiKey, api: anthropic-messages, models: []} still serves its 26 bundled models. An override with no credential serves NOTHING — omp has no key to reach the endpoint — so the empty-state message names the credential instead of only the shape.
  • A provider that does not exist yet is ALWAYS a change. The upsert's no-op guard originally required a model addition or a filled dialect field, so a discovery/override registration — which by design adds no models — returned written: false and wrote nothing while the UI reported success. providerChanged now includes !existing.

  • createdProvider was removed rather than left in the result: nothing consumed it, and written already says whether the file moved.

  • credentialSource is the signal for which dialog a provider needs ('omp-auth' | 'models.yml' | 'chamber', merged so models.yml wins). The old test — id.startsWith('omp-auth-') — was wrong twice over: a native models.yml entry shares that id prefix after the merge, and a keyless local server has no login flow to complete at all. A keyless provider now opens the endpoint dialog, which shows an explicit "registered with auth: none" note instead of an API-key field, and handleReconnect refuses to persist the dialog's masked placeholder as its credential.

  • Presets are grouped data, and availability is a rule not a status test. PRESET_NEW_PROVIDERS carries group, api, auth, discovery, and bundled; buildAvailableProviderPresets offers a preset unless its slug is already OWNED (providerOwnsSlug: connected, or carrying its own baseUrl), and a bundled preset is always offered because its entry is an add-only override. status alone is the wrong test — omp reports ~60 providers it merely knows (get_login_providers), all disconnected with no endpoint, and treating those as taken hid every gateway preset, the one case where the user wants to bring their own key. The same rule feeds existingSlugs, which previously blocked the dialog with "already registered in models.yml" for a provider that was not in the file at all.

  • modelSource is persisted on the provider so the models panel can say WHY a list is empty (providerEmptyReason). A discovery provider and an endpoint override have no local list BY DESIGN, and printing "no models" for either made a correct registration read as a failed one — while a hosted provider with no models keeps the unexplained message, because that one is a problem.

  • Validation was extended to the new fields (models-validation.ts, unit-tested): auth outside the three values, an unknown discovery.type, discovery without a provider api (except proxy, which reports one per model), and injectV1 outside openai-models-list are all refused. omp's failure mode is why — one schema violation anywhere in the file makes it disable EVERY custom provider at once.

  • isMaskedApiKey lives in src/shared/lib/models/provider/dialect.ts, not in the writer: the client produces the sk-••••… placeholder and the server is the last gate before the file, so one predicate has to serve both.

  • "add model" beside "fetch models" is the path for ids no listing reports (AddModelModal.tsx → POST /api/settings/provider-model → manualModelSeed). A listing endpoint is not the only way to know a model exists: an Azure deployment is a name the user chose, a gateway may serve a model its /models route omits, and Bedrock/Vertex expose no /models at all. The dialog writes the same models.yml entry the fetch would, so both paths converge on one writer. Only the model id is required — every other field is metadata omp works without (a missing context window is estimated, a missing price is simply not accounted), and requiring them would block the common case of "just add this id I know exists".

  • manualModelSeed drops what omp would reject rather than letting the file be validated after the fact: a non-positive contextWindow/maxTokens and a HALF-filled price (omp's schema requires all four cost fields together) are omitted, and fractional token counts are rounded. The dialog validates the same rules inline so the user sees the problem before the request — but the seed builder is the gate, because it is also reachable from a stale client.

  • A vision model needs a compat flag, or omp throws the picture away. An entry declaring input: [text, image] reached the provider with its pixels replaced by [image omitted: the active model does not support image input]: omp derives stripImageInput from the model id, and that derived value wins over a compat the file does not state. Measured on deepseek-v4-1-flash through a local proxy that logged the outgoing payload — the identical body posted by hand came back with a correct description, so the provider was never the problem. Only the deepseek-* chat/reasoning ids strip today (deepseek-ocr and deepseek-vision do not), but that table belongs to omp and moves with its releases, so toModelEntry writes compat: { stripImageInput: false } for EVERY model whose vision toggle is on instead of re-deriving the classification — a second copy of that fact would drift, and the flag is inert where nothing strips. backfillableIds counts an entry that already names the image input but carries no compat as repairable, which is the only way the re-import path ever reaches that shape; a compat the user pinned is never rewritten. Two entries in one file, same provider, measured on the wire: without the flag STRIPPED, with it IMAGE.

  • "Already registered" and "refused" are different answers, and skippedModels cannot tell them apart. The writer skips a model both when the id is known and when it declines to create a provider it has no endpoint/credential for; reporting the second as the first hid the real reason ("provider not yet in models.yml and no api key available to register it"). The route reads readNativeProviders() BEFORE the write — after it, the model this call just added would count as pre-existing — and only a hit there is reported as a duplicate, with 200; a refusal stays 400 with omp's own reason. A duplicate is deliberately not a failure: the existing entry may be one the user hand-tuned in models.yml, and the add-only paths never touch an entry they did not write.

  • "fetch models" REPLACES the provider's list; every other writer appends. replaceProviderModels (client, shared/lib/models/provider/models.ts) makes the endpoint's answer the model list — an id it no longer serves leaves — while carrying the user's per-model choices (visibility, sampling) onto the ids that survive. The request's replaceModels: true carries the same rule into models.yml (prunableIds → removedModels), and the panel reads its list from that file, so a client-only replace would have been undone on the next load. Measured end to end against a stub /models with a temp agent dir: a provider holding [withdrawn, kept] became [kept, brand-new] with removedCount: 1, the panel payload agreed, and a second fetch WITHOUT the flag still appended only. The consequence is deliberate and must be named in the UI's copy: an id registered by hand for a model the listing omits (Azure deployment, gateway-only id) is pruned by the next fetch — that is what "the listing is the list" means. replaceModels is sent only by the fetch path; AddProviderModal's registration and the "add model" dialog leave it off, and overrideOnly/discovery can never prune (they write no ids). An entry whose id cannot be read is never pruned.

  • The endpoint and credential ride along only to CREATE a missing entry. baseUrl/apiKey/auth are forwarded from the selected provider, and the writer never rewrites a provider field an existing entry already carries — so adding a model to a live provider can never change its endpoint. Verified end to end: a hand-added model on an existing provider, a fresh provider created from the dialog's endpoint+key, a keyless one with auth: none, and a refusal with neither — all four accepted by omp models with zero warnings.

  • After a hand-registered model the registry is re-READ, not re-saved (handleModelAdded → loadProvidersFromApi). The new row exists only in omp's file, so Kabmo overlay knows nothing about it; re-saving the overlay would return the overlay alone and leave the list short by one. Verified in the browser: the count went 3 → 4 and the row rendered with its context badge.

  • All four models.yml cost rates are entered, and the reasoning ladder is a set of checkboxes. PriceFields.tsx asks for input/output/cache-read/cache-write; EffortLadder.tsx ticks the levels omp's EffortSchema accepts. Both encode a rule that is invisible in the UI otherwise:

    • Input and output are the pair that decides whether a price exists at all — omp requires all four cost fields together, so a lone cache rate with no headline price is refused inline rather than written as a partial mapping. Empty cache rates become 0, which is the honest value for "no cached-token discount" (without them omp bills every cached turn at the full input rate). Verified against omp: cacheRead: 0.25, cacheWrite: 3.125 round-trip through omp models.
    • off is deliberately not an effort. omp's schema rejects it inside thinking.efforts ("must be minimal, low, medium, high, xhigh or max") and turning thinking off is a per-turn choice the composer owns. An unknown level is FILTERED OUT at the route before it can reach the file — one bad level disables every custom provider — while the valid ones in the same request are still written.
    • An empty ladder is a distinct state, not an error. omp already assumes its own ladder for a reasoning model, so efforts: [] would add a block that changes nothing; toModelEntry therefore writes no thinking block at all, and the hint says so ("No ladder declared — omp keeps its own default levels"). Ticking levels while Reasoning is off is refused: it would declare a capability for a model omp is not told can reason.
    • The ladder is normalised to omp's order regardless of the order the boxes were ticked, and thinking.mode is always written — omitting it is a schema failure that takes the whole file down. thinkingErrors in models-validation.ts checks mode, vocabulary and the presence of a ladder, and sanitizeModelEntry DROPS an unusable block rather than the model, since a model with omp's default ladder still runs.
  • "delete" exists only for a provider that HAS a models.yml entry, and the server says so. ProviderItem.inModelsYml is set by the registry (nativeProviderItem is built FROM the file, so it is true by construction) and unioned across the merge, because the two halves see different files: a login provider's omp-auth half knows nothing about models.yml, while the native half does. The button appears beside enable/reconnect in AuthSection.tsx only when the flag is set — a provider living solely in Kabmo overlay has nothing in the file to remove, and offering the button would promise an action it cannot perform. DeleteProviderModal.tsx names what actually goes (the file entry, its model count, the endpoint and key stored on it, which are only ever shown masked so they cannot be recovered) and what does NOT: a login provider's omp-auth credential is untouched, which is the difference between "I can add this back" and "I deleted my Anthropic login".

  • The DELETE handler resolves its target against the MERGED registry, not just the overlay. It used to look the id up in the SQLite overlay alone — so a provider that exists only in models.yml (the common case: it was added by hand, or by an earlier version of the dialog) had no overlay row, target came back undefined, and the removeOmpProvider call below was skipped. The response still said success: true, the provider came straight back on the next load, and the delete looked like it had done nothing. Verified before/after against a real models.yml: the native-only entry is now actually removed.

  • The delete response reports removedFromOmp and modelsRemoved separately from success. The overlay row is gone even when the file cleanup fails, so the two are different facts and the UI reports the failure as a warning rather than as a clean delete. modelsRemoved (from removeOmpProvider) is what lets the toast say how many models went with the provider instead of implying zero.

  • The delete fallback list is MOCK-only. providersStore.remove takes absent/empty fallbacks, and passing the shipped DEFAULT_PROVIDERS_LIST in real mode would write demo providers into a user's overlay on the first delete — providersStore.read already returns [] there, so the fallback now matches it outside MOCK.

Provider Usage (Settings → Usage, right-panel Usage)

  • Two surfaces read one endpoint, GET /api/settings/usage: the Settings → Usage category (src/client/components/settings/categories/UsageSettings.tsx) and the right-panel usage view (src/client/components/workspace/usage-panel/). Both derive their rows from the same buildProviders (usage-settings/providers.ts), so the sidebar list and the panel dropdown cannot disagree. The provider id is the slug, not a closed union — a provider omp can authenticate appears without a code change.
  • The panel shows quota and balance only — never locally recorded tokens/cost. Usage is what a provider reports; a number derived from Kabmo's own transcript scan is a different quantity, and mixing the two made the card look like it had two disagreeing answers. kenari and DeepSeek are the exception only because their own APIs report a wallet/plan (Rupiah) and a prepaid balance — that is vendor data, not local. Local token/cost attribution lives in the separate Token Usage surface below, and the two never share a number.
  • A provider with no API key is omitted, never rendered as an empty row. The credential set comes from listCredentialedProviders (src/server/lib/usage/provider-key.ts), which unions three store scans (models.yml apiKey, agent.db auth_credentials, Kabmo's own provider overlay) with omp's own view — get_login_providers.authenticated plus the providers in get_available_models. The registry half is what makes environment variables work: ANTHROPIC_API_KEY=… omp authenticates and serves Anthropic models while no store on disk names it, so a store-only scan would hide a provider the user is actively running. A slug no store accounts for is reported as environment.
  • Two quota sources, tried in that order. (1) fetchOmpUsageSnapshot (src/server/lib/usage/omp-usage.server.ts) runs omp usage --json and flattens each UsageLimit into UsageLimitWindow, resolving usedFraction with omp's own precedence (explicit > used/limit > percent-unit used > inverted remainingFraction). omp ships a usage adapter per vendor — 20 in 18.3.0 — but they cover subscription plans (rolling 5h/7d windows): anthropic, openai-codex, github-copilot, google-antigravity, google-gemini-cli, cursor, zai, kimi-code, cline-pass, minimax-code, muse-code, umans, devin, charm-hyper, xai-oauth, opencode-go, alibaba-token-plan, synthetic, ollama, ollama-cloud. (2) fetchVendorBalance (vendor-balance.server.ts) covers pay-as-you-go credit balances omp has no adapter for: openrouter, moonshot, siliconflow, novita, deepinfra. (3) buildNewApiReports (new-api.ts) covers self-hosted New API/one-api relays, whose endpoint is the provider's own base URL. All three shape into the same UsageLimitWindow[], so one renderer draws them and tracked becomes true when any of them yields data.
  • A relay answers on the provider's OWN base URL, so its URL is not a constant. A New API gateway (the Calcium-Ion/new-api family) is registered under the user's slug (aihub-brisnets-jatis → https://aihub.brisnets.com/v1), so buildNewApiReports takes the key and the endpoint from resolveProviderEndpoint (provider-key.ts), which reads Kabmo's overlay then the models.yml entry — agent.db carries no URL, so a key stored only there resolves to nothing. The family is identified by host (aihub.brisnets.com, easyaihub.ai; a look-alike host such as notbrisnets.com does not match), so any other provider costs one base-URL read and no request. Measured against v1.0.0-rc.26-aihub.3.12 with the stored sk- key: GET /v1/dashboard/billing/usage → {"object":"list","total_usage":1365.635}, i.e. USD cents (amount * 100 in controller/billing.go), and GET /v1/dashboard/billing/subscription → {"hard_limit_usd":100000000}, the literal New API writes for a token with unlimited_quota — not a balance. So parseNewApiBilling prints "Spent (all time)" for the sentinel and remaining = hard_limit_usd - total_usage / 100 only for a genuinely limited token, because subscription is remaining + used (per-token when the site enables DisplayTokenStatEnabled, else per-user; both endpoints read the same flag, so the subtraction holds either way). The account balance is out of reach: /api/user/self returns 401 {"code":"AUTH_UNAUTHORIZED","message":"Unauthorized, invalid access token"} for an sk- key — it wants a console access token, which a provider entry does not carry — so an unlimited key honestly reports spend and points at the gateway console rather than inventing a remaining figure.
  • Anthropic and OpenAI are deliberately absent from the balance table. Their usage/cost reports (/v1/organizations/usage_report/messages, /v1/organization/usage/completions) require an org admin key — a workspace key cannot substitute — so Kabmo cannot read them with the credential the user actually configured. Anthropic still appears through omp's own adapter (which uses the OAuth subscription token), and its card says so when the fetch comes back empty.
  • tracked is a real distinction, and accountsWithoutUsage is the signal. omp names a provider in accountsWithoutUsage only when it has an adapter whose fetch produced nothing; a provider it does not track never appears there at all. Verified against omp 18.3.0 with a stored credential: a failing Anthropic fetch (adapter exists) lands in the list, while a stored DeepSeek key with no adapter does not. resolveUsageTracking (providers.server.ts, unit-tested) derives tracked from "in reports or in accountsWithoutUsage", and the card prints a different explanation for each: no quota source at all versus a tracked provider whose endpoint came back empty. Collapsing the two tells the user a supported provider is unsupported. A provider that failed outright (error set) with no windows shows only the error — never a second "no quota source" note contradicting it.
  • kenari and DeepSeek keep their rich reports. Both expose more than a limit list (Rupiah wallet/plan windows/coupons; prepaid balance), so UsageProviderSummary carries an optional kenari/deepseek field and ProviderDetail renders the rich card instead of the generic sections for those two. Every other provider gets LimitsSection, which is also where a USD credit balance lands.
  • A Kenari provider is identified per SLUG, so two accounts stay two providers. kenariProviderSlugs decides which credentialed slugs are Kenari (spelling, or the endpoint in Kabmo overlay / models.yml), resolveKenariApiKey(slug) reads that account's own key, and buildKenariReport(slug) fetches its quota/balance/usage — two accounts share the same upstream host, so the credential is the only thing telling them apart. Both halves were once pinned to the literal slug kenari: providerIdentityKey folded every entry whose name/slug/endpoint mentioned kenari onto one kenari key (a second models.yml account merged into the first's settings row, so its key was never read and the panel could only disconnect/delete one while omp still served the other), and the usage gate credentials.has('kenari') never built a report for it. Identity is now the provider's OWN slug, which still merges the two halves of one provider because omp reports a models.yml provider under its models.yml key.
  • The quota probe is cached for 60s; the Refresh button forces past it. omp usage calls every provider's endpoint, so a topic republish must not run it. ?refresh=1 (sent only by a user's own Refresh) bypasses the cache — without it the button would return a minute-old snapshot and look broken. The registry probe behind get_available_models/get_login_providers has its own 60s cache and a cold spawn of ~1s, which is why provider names degrade to the slug-derived label when omp is cold rather than blocking the response. Vendor balances are fetched per request (a handful of cheap GETs) and a provider whose key lives only in the server's environment is a silent miss, not an error.
  • Mock mode returns a deterministic four-provider report (kenari, DeepSeek, Anthropic with percent and non-percent windows, OpenRouter with a USD credit balance) so every card shape renders under MOCK=true.

Token Usage telemetry (Settings → Token Usage)

  • The panel is a two-level PROVIDER → MODEL tree, because message.provider exists on every entry. The old breakdown keyed on model alone, so two accounts serving deepseek-v4-1-flash reported one merged $1 673.86 row. Measured over this machine's 1 232 transcripts: kenari-jatis $1 619.43 versus kenari $54.43 for the same model id — a ~30× price difference the single-key table could not show. toBreakdownRows is gone; the tree is built by providerModelRows (src/shared/lib/usage/view.ts) and provider identity is canonicalProviderSlug (alias command-code → commandcode), the SAME helper the quota surfaces use. kenari and kenari-jatis are deliberately NOT merged: they are different accounts with different rates.
  • The day is the reader's LOCAL calendar day. The scan used timestamp.slice(0, 10), i.e. the UTC prefix, while "Today" is a local calendar day (setHours(0,0,0,0)), so a 00:30 WIB record landed in yesterday's chart column but counted in today's total. dayKeyOfTimestamp/localDayKey (src/shared/lib/usage/range.ts) are now the only day functions, shared by server filtering and client bucketing — two copies of "what is a week" is how a chart disagrees with the table beside it.
  • A missing timestamp is a distinct bucket, not a dropped record. day is '' (never NULL — SQLite treats NULLs as distinct in a primary key, so an undated contribution would INSERT again on every scan). Every window predicate is day = '' OR day BETWEEN ? AND ?, because a missing date is not evidence of age.
  • The panel reads an on-disk index, not the sessions tree. usage_rollup holds counters per (file, day, provider, model, project) and usage_index_file holds each transcript's folded byte offset. Measured on this machine: the old per-request scan read 1 227 files / 1 580 MB and took 3.8–8.0 s cold, with the fold repeated per window. The index builds once (3.9 s, 144 k records, 1 402 rollup rows) and afterwards a period is a GROUP BY over ~1 400 rows — 1.6 ms server-side, ~70 ms end to end over HTTP, and a no-change recheck costs 42 ms.
  • Only appended bytes are re-read, and a rewritten file is rebuilt, not patched. An append is a slice(previous.size, size) tail read committed with a compare-and-swap on (offset, size); a truncation or same-length rewrite takes the full-read path, which DELETEs the file's rows first — otherwise a pruned session would keep charging for turns whose file is gone. A BEYOND-EOF or older-format row (offset !== size) also forces the full read, so a row written by another build can never be extended with a different attribution.
  • <$0.01 is printed, never $0.00, for a real sub-cent cost. Rounding a nonzero cost to zero reads as "free", which is exactly what an unpriced provider is not. Unpriced is a per-RECORD property (it carried tokens and no reported cost) and is reported as Unpriced turns rather than being folded into the total.
  • The chart is stacked by provider, and the legend toggles a band. A single total line cannot show that one account is 95% of the bill. Breakdown tab and chart metric make NO request: the payload carries the period's daily rows, so bucketDays re-buckets client-side — one request per period change, none for a tab or metric switch.
  • The panel has ONE period control: Day / Week / Month / 90 days / All time / Custom. They are the same kind of choice — which trailing span to report — so a separate daily/weekly/monthly switch beside them was a second control for one fact. It also looked broken by construction: a period sum cannot move when days are regrouped, so the cadence switch could only repaint the chart (reported twice). Every figure is now the selected span's total, and there is no per-day/per-week average anywhere. Day = today, Week = the last 7 calendar days, Month = the last 30 — one list from timeRangeOptions.
  • Only the CHART and the time tab bucket, and the width follows the period's length (granularityFor): a day/week/month draws days, 90 days draws weeks, all time and long custom spans draw months. The time tab renames itself (DAY/WEEK/MONTH) and its rows are those buckets' totals. Measured on this machine: Day $7.73 / 4 260 turns, Week $41.90 / 21 555, Month $1 633.36 / 95 156, 90 days $2 073.38, All time $2 073.39 — each span its own totals, one request per change.
  • The time tab lists the PERIOD, so a quiet day is a row with zeros. The rollup only stores days that saw usage, and dayRows used to map exactly those — so a month with three idle days showed 27 rows, and the table silently stopped matching the totals beside it. The period's own span now fills the gaps (daysInWindow; all time uses spanOfDays, its recorded first→last day), rows are ordered by DATE rather than by cost, and the tab is never sliced: it is a scroll region (max-height ≈ 14 rows) with its count printed as 30 rows · day. Measured: Month = 30 rows (Oct 5 → Nov 3), 90 days = 14 week rows, All time = 6 month rows (Jun → Nov). The provider/model tree keeps its "Show all N rows" because that is a ranked list, not a calendar.
  • The period menu anchors LEFT on phones, and the tab row wraps. Two mobile bugs from one cause: the panel's controls were laid out for the desktop card. The menu was absolute right-0 on a trigger that fills the row on a phone, so it hung off the viewport's left edge (measured at x=-157); it is now left-0 … sm:left-auto sm:right-0 with max-w-[calc(100vw-2rem)]. The breakdown header was flex justify-between with no wrap, so the four tabs were 14–84 px wider than the card (PROJECT sat outside it at 320/360/390 px) — that header is flex-wrap now. Verified at 320/360/390 and 1440: no horizontal document overflow, the last tab inside the card, the menu inside the viewport.
  • A custom range names its dates in the control, and applies immediately. The button read only "Custom…", which is indistinguishable from a dead control when its default dates equal the previous preset (Oct 5 – Nov 3 was exactly "Last 30 days" — the reason it looked like nothing happened). It now prints 2026-10-05 – 2026-11-03, and the date ceiling is the payload's own generatedAt, not the panel's mount clock, so a tab left open across midnight cannot offer a "future" day. Verified: picking Sep 1 – Sep 30 changed the header, all tiles, the provider split ($48.57, Kenari.id only) and the bucket count (1).
  • Nothing in the panel is a hardcoded string. The old surface printed "DeepSeek", "100.0% share", "0.0x the raw token cost", "0 cache writes", "0.1s" and the range labels from MOCK data (Sep 7, 2026) in real mode. Every value now comes from the payload, and the footer reports the index's own age, transcript/record counts and scan duration.
  • A failure is reported, not rendered as zero. The route answers { error } with status 500 and the panel shows the message with a Retry; the old shape returned zeroed metrics that were indistinguishable from "no work this month".
  • No catalog fetch on the request path. loadModelRates pulled https://models.dev/api.json (5.96 MB, measured 5.63 s against an 8 s timeout) on every request and its pricing field was never read by any client code.

Provider Web Icons (the models.yml provider's own favicon)

  • A models.yml provider's row shows the site's own icon, in its own colours. Kabmo's mark table can only hold the providers omp ships; a gateway a user registered yesterday has no entry there, so every such row fell back to initials. The endpoint's HOST is the only identity that row has, and its favicon is the only logo available — so fetchProviderIcon (provider-icon-fetch.ts) reads origin/ (the PATH is dropped: https://host/v1/favicon.ico is a 404 on nearly every gateway), takes the icons the page DECLARES, and only then falls back to /favicon.ico. This is the one mark in the app drawn in colour: recolouring a brand logo to currentColor turns it into a silhouette, which is why ProviderIconPlate renders it as an <img> (object-contain, no filter) and keeps the monochrome mark for everything else.

  • Three fallbacks, in that order: the endpoint host, its base domain, the initials. providerIconOrigins (provider-icon-parse.ts) returns the endpoint's own origin first and the registrable domain behind it second (https://api.kenari.id/v1 → https://api.kenari.id, then https://kenari.id), and fetchProviderIcon reads each origin fully — page, declared icons, /favicon.ico — before moving to the next. The order is the rule: an API host that publishes its own favicon keeps it, and the apex is only consulted when the endpoint host yields nothing (the common case: api. serves no page, the brand site does). providerBaseOrigin handles the two-label suffixes (kenari.co.id is a site, co.id is a suffix), refuses IPs and single labels, and refuses SHARED platform apexes — x.vercel.app, x.github.io, x.ngrok-free.app and their kin — because that favicon is the platform's logo, which would paint Vercel's triangle on a private gateway. Pinned in provider-icon-parse.test.ts and provider-icon-fetch.test.ts.

  • Ranking is tiers, not pixels (provider-icon-parse.ts, pure and pinned by tests): an SVG (sizes="any") scales to any plate and wins, an apple-touch-icon is a large PNG by convention and is next, then fixed sizes largest-first, then a tag that states none. mask-icon is skipped — it is a monochrome silhouette meant for Safari's pinned tabs, so painting it in a plate shows a blob. Measured against a local stub that declares a 16px icon, an apple-touch-icon and a 404 /favicon.ico: the stored source was .../logo.png, i.e. the apple-touch-icon, and neither the small icon nor the 404 page.

  • The bytes are sniffed, never trusted. A "favicon" answering text/html is a 404 page or a login wall; storing it would paint a broken image in the list. looksLikeSvg covers the one format no magic-byte table catches, getImageMimeFromBytes covers the rest, and a declared image/* with no magic match is kept because the browser decides what it can paint. Every fetch is bounded (4s, 512 KiB, 4 candidates) — the caller is a settings panel and the host is a stranger.

  • The bytes are stored in Kabmo's database (provider_icons, provider-icon-store.server.ts, created by initSchema). Not a temp file (lost on restart, refetched from a third party), not the settings blob (app_settings is written by the modal, so the two writers would race for one row), and not a data URL in the payload (~10-50 KB × ~100 providers on the panel's first paint). A MISS is a row too (status='missing'): a private gateway, a host behind auth and a site with no favicon all look the same from here, and without a negative row every panel load would retry a 4s timeout per provider.

  • The panel never waits on a third party. stampProviderIcons reads stored STAMPS (one query, no bytes) and puts iconUrl on the items whose icon is known; the fetch is a background pass (4 at a time, deduped per slug) that drops the registry cache when it stored something. The panel subscribes to that models signal with a 400ms debounce, so icons appear without reopening the dialog. Freshness is asymmetric on purpose: a HIT is good for a week, a MISS for a day.

  • The URL carries the fetch time (/api/provider-icon?slug=…&v=<fetchedAt>), which is what makes immutable safe: a changed icon is a changed URL, so no layer — the realtime topic, the panel's state, the browser cache — can pin the old picture. The route answers nosniff and a sandbox CSP, because an SVG served from here must not run script if a reader opens it directly. A refetch is a button in the header (POST /api/provider-icon, which deletes the row first so the freshness check cannot short-circuit) and reports its outcome: a host with no icon says so and keeps the current mark.

  • A failed image falls back to the built-in mark (onError in IconPlate): the bytes came from a third party, so a site that drops its favicon must not leave a broken-image glyph in the row.

  • The composer's picker is the OTHER surface that draws these marks, and it was left behind. ProviderIconPlate lives in common/provider-icon/Plate.tsx (not in the settings folder) for exactly this reason: a composer importing from a settings folder is the edge that becomes a copy the first time one of them needs a tweak. /api/models now carries providerIconUrl on each ModelEntry (loadModels reads the same stored STAMPS as the settings registry), toOption copies it onto AIModelOption, and the picker draws it on an 18px plate in the row, the section header and the 16px trigger. All four are the same component, so a provider cannot show its site logo in Settings and initials in the chat.

  • The selected model's mark is resolved against the CATALOG, not just the prop. onSelectModel(model) leaves this component and comes back as a prop the composer builds from provider + id — which carries neither providerIcon nor providerIconUrl. Reading only the prop made the trigger fall back to initials for a provider whose logo the picker was showing one row below (measured: localtest rendered a SPAN in the trigger and an IMG in its row). selectedMark looks the pair up in the loaded catalog and only then gives up.

  • The picker is a GRID, and the misalignment was the same class of bug as the settings list. Measured over 95 rows: the name column was ragged because a row's mark was a raw 13px icon — an SVG for a brand, a TEXT-WIDTH pill for the initials fallback — and the context badge floated against whatever the name's length happened to be. It is now a grip slot, an 18px plate, a name that takes the slack (flex-1 min-w-0 truncate) and a fixed w-11 text-right tabular-nums context column. The right cluster is a fixed w-[100px], right-aligned, because its width is what moved the context column: the selected row's checkmark plus a wider thinking label grew it by 25px, and that row's badge sat at x=547 while the other 94 were at 572 (after: all 95 at 545). The section header starts IN that grid's grip column, not after it — its mark takes the same 18px slot the rows keep for the drag handle, and its title then sits on the rows' plate column. A provider's mark therefore centres on the rows' grip and its name starts where the rows draw their plate (measured: mark and grip at 323, title and plate at 349, on all eight sections). The earlier version padded the header with an EMPTY grip slot so the title lined up with the model NAMES instead, which put the provider mark a column to the right of the grips and made the two icon columns read as two lists. The disclosure chevron is built from the same slot as a row's favourite star (p-1 around a 13px mark), not a bare icon: flush against the panel edge it sat 4.5px right of every star below it (measured: chevron centre 675, star centre 670.5; after: both 670.5 on all eight sections).. The TRIGGER keeps its own rule from trigger.test.ts: the provider never truncates (kenari and kenari-jatis are two accounts) and the model takes the slack.

  • A picker row is its SECTION plus its model, and a rail row must name the provider of a shared name. One model is drawn TWICE — in FAVORITES/RECENT and again under its provider — so the old modelKey-keyed index described only one of the two: measured in the browser, ArrowDown stepped over the rail rows and both copies lit at once (bg-ink/10 on two rows), and the specs card's querySelector('[data-model-key="…"]') anchored to whichever copy came first in the DOM (card at y=325 while the pointer was on the copy at y=432). Rows are now section::provider:id (rowIdFor in model-dropdown/groups.ts), visibleFlatList is a PickerRow[], and data-picker-row is the card's only anchor — verified both ways: hovering either copy put the card on that copy's own top edge. A repeated key in the stored list is claimed once, so a hand-edited recentKeys cannot draw the same row id twice. The other half is the label: FAVORITES and RECENT have no provider header, so DeepSeek V4 Pro served by deepseek and by kenari rendered as two identical rows. A rail row now carries a provider tag, and only when another provider serves that name (ambiguousNames, computed over the whole catalog so the tag does not flicker as the reader types) — a tag on all 95 rows is noise, and a provider section already says its provider in the header. The tag never shrinks or wraps (kenari vs kenari-jatis, the trigger's own rule); measured at a 412px viewport it costs 43–53px and left the name 37px of the 99px it needs, so on a TAGGED row below sm the w-11 context column yields instead: name back to 99px, no truncation, no row overflow. At 1440px the tag fits and the name loses at most 14px — and the two copies of a shared name lose the same amount, so they stay comparable. The trailing cells read context · thinking · provider · star, and the context number is therefore no longer a column. It was a pinned w-11 cell beside the star; it is now the FIRST cell of a right-aligned cluster, so its x follows the width of the pill and the tag to its right — measured over the seeded catalog, 626 on rows with neither and 519 where both are present, a 107px spread. That is the accepted cost of the reading order (name, its size, its effort, its provider, the star). The checkmark that used to sit here was deleted with it: it was the only cell whose presence depended on selection, and the row's tint plus its semibold name already say this is the model in use.

  • Section folds are a GLOBAL preference (app_settings.omp_model_dropdown_collapsed), not session state. The fold first lived in a useState (reset on every reload), then in the session UI blob under chat.modelDropdownCollapsed. That fixed the reload but tied the fold to one chat: a new chat and every session that had never stored a map drew the whole list expanded, so a reader who folds the providers they never use had to fold them again in each conversation (measured in the browser: fold DEEPSEEK in session 13, open a new chat — all 95 rows expanded again). It is a preference about the list, and it now sits beside the sidebar's width in app_settings (shared/lib/models/picker-collapsed.ts). An install's per-session map is adopted ONCE on the next session load, then the legacy slot is cleared so the blob stops carrying a second answer — refresh.test.tsx pins the carry-over into a different session and the one-time adoption.

  • Section headings are STICKY, and the list deliberately has no top padding — that is where they pin. A provider can hold more rows than the panel's max-h-80 viewport, so scrolling a long provider left its rows with no heading naming them. The heading is now sticky top-0 z-10 bg-paper: the opaque background hides the rows passing underneath and z-10 keeps it above them (an incoming section's heading paints over a pinned one, verified in Chromium at the moment the second heading reached the top). The scroller carries px-1.5 pb-1.5, no top padding, because Chromium's sticky view rectangle is the scrollport's CONTENT box: with the old p-1.5, a top-0 heading pinned 6px down and elementFromPoint 2px below the list top returned a ROW sliding through that band (measured). After the change the pinned offset is 0 and the same hit test names the heading.

  • The hover card is one definition list, and it follows the row it describes. It used to be six hand-written rows that had already drifted three ways — items-start on Capabilities against items-center on the rest, a mono value column under sans labels, and three different separator treatments (border-ink/10+pt-1, border-ink/5+pt-1, border-ink/5+pt-1.5) for the same grouping device. Every fact now renders through one row shape on one grid: a fixed 5.5rem label track and a right-aligned tabular-nums value track, so labels share a left edge (measured x=719) and values a right edge (x=977). The card also tracked the PANEL, not the row: it was self-center in the panel's flex row, so hovering a model near the top drew its specs half a panel away (measured: row at y=530, card at y=510 and drifting further the further down the list you hovered). It is now positioned against the row's own data-model-key — the same composite identity the keyboard navigation uses, so mouse and keyboard resolve to one anchor — clamped to the panel, and recomputed on the list's scroll (onScroll) so a resting pointer's card stays with its row. pointer-events-none keeps the card from stealing the hover that opened it.

Provider Marks (src/client/components/common/provider-icon/)

  • One component draws every provider logo, and every surface goes through it: the provider settings sidebar/header/login/reconnect modals and the "add provider" preset list, the composer's model picker (rows and section headers), and both usage surfaces. A provider therefore cannot be a whale emoji in the picker and a Lucide cloud in Settings — the previous per-surface switch on providerIcon and its plug/Bot/Coins placeholders are gone, and provider-settings/Icons.tsx was deleted with them.
  • Resolution is data, in src/shared/lib/models/provider/glyph.ts. A provider reaches the component as whatever string omp reported — a login provider id (google-vertex), a user-typed models.yml slug, a legacy icon key (claude), or a display name — so lookup folds the input to lowercase alphanumerics and matches PROVIDER_GLYPH_ALIASES. Variants of one brand are rows in that table (minimax-code-cn, xiaomi-token-plan-ams), never branches at a call site. resolveProviderGlyph(icon, slug, name) tries the stored icon key FIRST so a legacy key keeps working after a slug changes; it returns null rather than guessing, which is what routes an unknown provider to the fallback.
  • A plugin's providerIcon registration beats the built-in mark, for the provider it names only (provider-icon/resolve.ts, called from that one component). The provider is folded with the same rule the table uses (foldProviderKey), so google-vertex, Google Vertex and a legacy icon key all find a registration. A registered glyph is a complete <svg> source whose paint is currentColor; the host still owns the outer <svg>, so it themes and sizes like a built-in mark. Two plugins naming one provider resolve to the first merged row (order, then plugin id, then registration id) — deterministic, and the second registration is still accepted. A glyph with no root <svg>/viewBox falls through to the built-in mark, so the mark shown never depends on which plugin shipped a broken string.
  • A provider with no mark draws its initials, not an empty box. providerInitials takes one initial per word, joined and closed with a single dot — Tooker → t., Toktok ID → ti., toktok-id → ti. — capped at two initials (a third overflows at icon size). The badge is a pill, not a square, and its font size is 1.2 × size: a square column forced the text to 9.5px for ti. to fit, whose ink was 6.4px against the marks' 13.8px median, so the fallback read as an undersized icon. At 1.2× the ink lands inside the box (10–15px in a 16px band, ≥1px clearance; 1.3× clips) and matches the marks. The badge is aria-hidden because the provider's name is always rendered beside it.
  • The glyphs are generated data, never hand-edited (provider-icon/glyphs.ts, 73 marks). Sources, in resolution order: @lobehub/icons-static-svg (MIT) → simple-icons (CC0, GitLab/Xiaomi) → selfh.st/icons (CC BY 4.0, LiteLLM/llama.cpp) → the vendor's own SVG with any background plate dropped (abliteration, aiand, aimlapi, yolo-auto) → a potrace outline of the vendor's own raster logo refitted to the shared box (coreweave, nanogpt, charm, singularity). That last tier is why five marks carry a translate/scale group: a brand publishing no vector mark is still drawn from its own art rather than approximated. A traced mark is refitted so its ink fills 88% of its viewBox — parsing magick -trim info: with one regex matched the canvas geometry rather than the ink bbox and left every traced mark ~2x small, which is the class of bug that made the initials badge look oversized by comparison; use -format %@ (it prints the ink bbox alone) and verify the refit by measuring the rendered ink box. Each glyph keeps its own viewBox (mostly 0 0 24 24; synthetic is 54, litellm/llamacpp 512), so a caller must pass glyph.viewBox rather than assuming 24. Marks whose art is naturally wide-and-short (Cloudflare, SiliconFlow, Alibaba, Abliteration) still read small by ink height — that is the logo's aspect, not a bake error.
  • Paint is folded to currentColor at bake time — a glyph takes the surrounding ink and follows the theme (verified: a theme flip moves a mark's computed colour), which is what keeps a dense monochrome list free of the only chroma in the palette. Per-element fill-opacity/fill-rule/stroke-width survive because they carry the mark's own structure (Azure's overlapping panes, Cerebras' ring, Synthetic's stroked outline), not a colour. These are third-party trademarks, used to identify the provider each belongs to; they are not covered by the project licence.
  • Adding a provider is one row in PROVIDER_GLYPH_ALIASES when the brand mark already exists, or one new glyph plus its row when it does not — never a new if in a renderer. provider-glyph.test.ts walks omp's whole KnownProvider census and fails if a provider resolves to neither a mark nor initials, so an upstream provider addition surfaces as a test failure rather than a blank badge.

Clone this wiki locally