ITAugust 18, 2026

Model routing and image approvals in our AI content pipeline

By Andrea Borghi
Model routing and image approvals in our AI content pipeline

Model Routing and Image Approvals in Our AI Content Pipeline

Source review updated November 9, 2026. This describes the current repository configuration; a source review alone does not verify a deployed version.

Green Yoga Inc's creative-writing prompts use GPT-6 Sol, while translation uses GPT-6 Luna. The model name is one part of the system. The request path, fallback rules, and image approval workflow also determine what the pipeline does.

Where the model gets chosen

Prompts live in ai-prompts/ as text files with metadata headers. For example, 05-yoga-script-generator.txt selects gpt-6-sol; 21-content-translation.txt and 26-ayurveda-recipe-translation.txt select gpt-6-luna. Some retained image prompts also have model headers, but a header does not establish that the content engine makes an image-generation call.

Both ai-content-engine and yoga-script normalize model names before sending requests. Their exact alias lists differ. This self-contained example illustrates the common unversioned aliases; the Lambda source remains the authority for the complete lists:

function normalizeModel(raw?: string): string {
  if (!raw) return "gpt-6-sol";
  const m = raw.trim().toLowerCase();
  const legacy = new Set(["gpt-5", "gpt-5.1", "gpt-5.2", "gpt-5.3", "gpt-5.4", "gpt-5.5", "gpt-5.6"]);
  const retired = new Set(["gpt-4o", "gpt-4o-mini", "gpt-4.1", "gpt-4.1-mini"]);
  if (legacy.has(m)) return "gpt-6-sol";
  if (retired.has(m)) return "gpt-6-luna";
  return m;
}

The current source routes the retired aliases in those lists to Luna. It does not pass gpt-4o through as the deliberate yoga-script fallback described in an earlier version of this article.

Request paths and a finite time budget

The two Lambdas send text-generation requests to Chat Completions. The developer-run scripts/generate-pose-images.mjs uses the Responses API image-generation tool instead. A manually run image batch is separate from the content engine's cover-image workflow.

The Yoga Sequence Builder offers separately paid teaching scripts through the yoga-script Lambda. Its source reserves time for returning a response:

  • A primary attempt is capped at seven minutes.
  • Twenty-five seconds are reserved to finish and return the response.
  • A fallback uses gpt-6-luna, and requires at least two minutes of remaining headroom before it starts.

If there is not enough time, the Lambda returns an error rather than starting a fallback it cannot finish. These are execution budgets, not promised response times.

Cover images wait for an operator

generateImage() in ai-content-engine is a no-op stub that returns the fallback cover. generateOrReuseImage() records the proposed prompt with an empty asset key and also returns the fallback. The approval workflow can then receive an image through media-receiver.

Image prompt records can retain separate clipL, t5xxl, and negative fields so an operator can use them in the appropriate rendering tool. That supports a reviewable image-submission step. It does not prove that every image already on the site received human review before publication.

Review the workflow, not only the model

A useful review checks the prompt, the selected route, failure recovery, available execution time, and the asset that will be published. Replacing a model name does not establish that all those parts work together or that a deployed service contains the intended source.

The relevant files are in ai-prompts/, lambda/ai-content-engine, and lambda/yoga-script. If you want help designing an approval flow for your own content pipeline, reach out.