openai-architect
Architect-level design on OpenAI's API — model tiers and what each is for, Responses versus Chat Completions semantics, structured outputs and strict schemas, tool calling and its loop, batch and file APIs, and the rate-limit and organisation structure that decides production behaviour. Use when the product calls OpenAI.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- openai-architect
- license
- MIT
- metadata
- { "crusor-path": "ai-ml-architect/providers-architect/openai-architect", "crusor-domain": "ai-ml-architect", "crusor-origin": "original", "crusor-sources": "platform.openai.com/docs/guides; platform.openai.com/docs/guides/structured-outputs; platform.openai.com/docs/guides/batch", "crusor-triggers": "openai, gpt, chat completions, responses api, openai batch, openai rate limits, json schema mode, o3, gpt-5", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level design on OpenAI's API — model tiers and what each is for, Responses versus Chat Completions semantics, structured outputs and strict schemas, tool calling and its loop, batch and file APIs, and the rate-limit and organisation structure that decides production behaviour. Use when the product calls OpenAI.
- compatibility
- OpenAI API (Responses, Chat Completions, Batch, Realtime)
03 SKILL.md 正文
OpenAI Architect
OpenAI's surface is a small set of primitives with strict-schema options. Use the strict path and the failure surface shrinks to cost and latency.
When to use
- The product already standardises on OpenAI or needs its ecosystem.
- Structured extraction where schema enforcement matters.
- High-volume offline work suited to the batch API.
When NOT to use
- Data residency or vendor policy forbids it →
open-weights-architect. - Model comparison across vendors →
model-selection-architectfirst.
Decision 1 — Endpoint
| Need | Endpoint |
|---|---|
| new server-side app | Responses API |
| legacy integration, many SDKs | Chat Completions |
| millions of offline requests | Batch API (cost, 24 h window) |
| live voice/streaming both ways | Realtime |
| embeddings | Embeddings API |
- Responses gives you server-side state and tool orchestration; Chat Completions is the compatibility path. Do not mix in one codebase without a reason.
- Batch is roughly half price for non-interactive work — the wrong choice only if you need the answer now.
Decision 2 — Model tiering
- Cheap tier for routing, classification, extraction, summarisation.
- Reasoning tier for multi-step maths, code, and agentic loops — it is slower and bills more tokens, including reasoning tokens.
- Route by task class in config, pinned to a dated model id; never
latest. - Re-run the eval suite on every model change (
evals-architect).
Decision 3 — Structured output
- Use strict structured outputs with a JSON schema, not "reply in JSON".
- Schemas: required fields,
additionalProperties: false, enums for closed sets. - Optionality is expensive — prefer a
null-able required field over a missing one. - Validate server-side anyway; on failure, one repair call, then a typed error.
Decision 4 — Limits and organisation
- Rate limits are per organisation/project and per model: separate projects per environment so a staging load test cannot starve production.
- Set per-project spend limits and alert thresholds; a runaway loop is billed.
- Retry 429/5xx with jittered backoff; respect
Retry-After. - Usage/cost reporting by project and by feature tag where available.
Decision 5 — Data handling
- Confirm retention and training terms for the tier you use; zero-retention arrangements differ per endpoint.
- Redact PII before sending where the product requires it.
- Log prompts only under the same policy as user content; store hashes for correlation if full text is not allowed.
Failure modes at scale
- Model id float to
latest; behaviour changes under you on a Tuesday. - Strict schema avoided, so 2% of responses fail parsing in production.
- One project shared by dev and prod; staging load test triggers 429s for users.
- Reasoning model used for a classification task; cost up 10×, latency 5×.
- Batch chosen for a user-facing feature that then "takes up to 24 h".
Verification receipts
- Endpoint choice per feature, with the reason recorded.
- Eval score per pinned model id, with the regression threshold.
- Schema validation test with a deliberately invalid model response.
- Rate-limit behaviour demonstrated with an induced 429.
- Cost report per project and feature for the last 30 days.
04 同仓库更多 Skills
interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.