Ai models

From gridaco/grida · View interactive version

Ai models is an AI agent skill from the GitHub repository gridaco/grida. Update Grida product model presets, native adapter compatibility and the pinned public Models dependency; distinguish canonical facts from live GG offerings. Use for model selection, ChatGPT subscription updates, client catalogue updates and model-discovery drift.

How to use this skill

Skill file

AI model ownership and client updates

Choose the owner first

| Subject | Canonical owner |

| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| Model identities, labels, releases, labs, provider bindings, capabilities, regular prices | Public CODE0, used at runtime by Desktop chat and BYOK image and video. The exact @grida/ai-models pin supplies the bundled seed. |

| Currently served GG models, effective capabilities, prices and operation schemas | GG models, endpoints, operation schemas. |

| Product membership, defaults, tier choices and feature subsets | data/ai/presets.json. |

| Executable native/BYOK inputs and adapters | data/ai/native-inputs.json, packages/grida-ai/src/, crates/grida-ai/src/. |

| Library model/dimensions/normalization storage invariant | presets.json → library_embedding; coordinate existing vectors before changing it. |

Do not recreate an authored factual catalogue or GG allowlist in Grida. A public

Models binding is a fact, not installed adapter support or GG availability.

Normal GG additions using an implemented interface need no model-ID code change.

A new transport, input contract or result format needs an actual client adapter.

@grida/ai/catalogue is the client compatibility projection plus product presets.

Its models values come from the external release; its catalog adds product

choices and the retained schema-1 installed-client protocol. It is not a second

facts authoring home. Unknown prices/estimates remain unknown, never zero.

Historical client estimates cannot authorize or settle hosted spending.

Desktop foreground chat resolves public facts through ChatModels in

@grida/ai/catalogue. Subscription choices require a selector in the public

agents.json, a compatible native adapter and an offer from the signed-in

account. OpenRouter and Vercel use the exact selected provider binding.

For subscription policy, data/ai/chatgpt-subscription.json owns the preferred

default and historical saved IDs. Update active public selectors in the Models

project. See the subscription provider runbook.

Desktop BYOK image and video use VisualModels over the same V2 snapshot.

Settings, pickers, and execution share adapter eligibility. The installed

image and video membership projection serves compatibility callers.

Catalogue ownership

Updating the public dependency or product presets

Read CODE0 and inspect the full old/new

released Models diff before repinning. Review lower/removed/zero prices, billing

units, provider IDs, capabilities and retirements against regular-price evidence.

Do not copy promotional rates or infer price equivalence across providers.

Source corrections belong in the public Models project, not local overrides.

Product recommendations never replace an explicit saved selection. Defaults must

remain active listed members; partial order must be deliberate and duplicate-free.

BYOK, custom endpoints, Ollama and ChatGPT subscription identities retain their

own selection and credential rules. Special background-removal/upscale tools

remain separate feature contracts; no need to advertise them as general GG models.

Run from the repository root:

node scripts/ai-catalogue/generate.mjs
pnpm --filter @grida/ai build
node scripts/ai-catalogue/generate.mjs --bundle
node scripts/ai-catalogue/generate.mjs --bundle --check
pnpm --filter @grida/ai test
pnpm --filter @grida/ai typecheck
cargo test -p grida-ai --locked

Commit the pin, presets/native-contract changes and generated projections together.

Never hand-edit marked generated:* literals or package/crate JSON projections.

Use the CLI contract gate for native protocol changes; review intentional fixture

changes rather than regenerating a baseline to hide drift. Run editor typecheck

when touching its consumers.

Discovery, execution and recovery

GG discovery is anonymous, bounded and shared per client host; it carries no

execution credential. Respect cache expiry and unavailable state rather than

restoring retired GG models from a bundled list. The hosted renderer preserves

released binaries lacking the discovery bridge through their existing finite

native choices; never enter that compatibility path after a capable host's

empty, failed or expired read. Desktop checks for newer V2 facts in the

background. Its verified cache and bundled seed provide offline metadata.

Keep /api/v1/models/catalog readable for older clients using

catalog.snapshot.legacy(). Omit shapes that schema 1 cannot represent and

preserve the exact facts in the current seed. GG discovery remains the

authority for current GG offerings.

Signed-in product usage keeps organization-scoped authorization and the existing

native response contracts. It does not require a standalone GG customer API key.

Preserve accepted task identity and recovery after discovery changes; failed

result retrieval never justifies a second paid submission. Hosted billing,

reservations and settlement remain service-owned. Read

CODE0 and the GRIDA-SEC-006

trust boundary for the native consumer contract.

Paid probes, production changes and deployments require their own authorization;

a catalogue update alone does not authorize them.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.