ACTION_ID: llm_models NAME: AI Generate Content CATEGORY: AI CREDITS: varies by model — see section 8 (Models reference) Generate prompt-based text using one of 22 supported LLMs across OpenAI, Anthropic, Google, and Baseten (GLM). Single action, model is chosen via the Model input. 1. INPUTS model (string, required) Model. The model id; see section 8. prompt (string, required) Prompt. Prompt text; supports {{variable.references}}, resolved per-row at runtime so each row gets its own prompt. output_format (string, optional) Output Format. Format spec for structured output. Honoured by every model in section 8. (Some retired models ignore it — see section 4 if you inherit a config that names one.) 2. OUTPUTS Outputs vary by the chosen model's handler group. generated_content (string) — the generated text. ALWAYS returned. reasoning (string) — model's reasoning trace. No model in section 8 populates it — treat it as always empty. To capture the model's rationale, declare a `reasoning` field in `output_format` and ask for it in the prompt. usage (json) — token + cost telemetry. Returned by OpenAI models and GLM 5.2 (Baseten). Nested fields: model_cost_usd (number) USD spent on this run input_tokens (number) output_tokens (number) model_used (string) Claude and Gemini models return only `generated_content`. Referencing {{llm_models_1.usage}} downstream of those models resolves to empty / undefined. 3. HOW TO CONFIGURE Configure Action body (free-text generation): { "inputs": { "model": "claude-sonnet-4-6", "prompt": "Summarize this article in 3 bullets: {{input.article_text}}" } } Configure Action body (structured output via `output_format`): { "inputs": { "model": "claude-sonnet-4-6", "prompt": "Extract the company's industry, hq city, and headcount from {{input.about_text}}.", "output_format": { "industry": "string", "hq_city": "string", "headcount": "number" } } } Field-by-field: - model Model id from section 8 (e.g. `claude-sonnet-5`, `gpt-5.6-sol`, `gpt-5.4-nano`). - prompt Prompt text. `{{ref}}` tokens (e.g. `{{input.article_text}}`, `{{enrich_company_linkedin_profile_1.recent_news}}`) are resolved per row. - output_format Optional structured-output schema. Each top-level key becomes a referenceable output field on this action — Configure Action persists the schema to `responseConfiguration` so Add Action / Get Action Outputs surface the user-defined fields under `outputs[]` and downstream actions can wire `{{.}}` references. Honoured by every live model in section 8. Two shapes are accepted: flat: { "name": "string", "headcount": "number" } detail: { "name": { "type": "string", "description": "Person's full name" } } Use the detail form for Parallel-handler models on `llm_web_agents`; both work for `llm_models`. Allowed `type` values on `llm_models`: `string`, `number`, `boolean`, `json`. `"array"` and `"raw_array"` are both rejected at Configure Action time (verified 2026-06-08) with: `output_format..type "array" is not supported. Allowed: json, string, number, boolean.` For an array-shaped output, the most reliable pattern today is to declare the field as `"string"` and instruct the model to return a JSON array (or object) as the field value. Downstream consumers handle the parsing transparently: `raw_to_structured_array` accepts a JSON-encoded array string and discovers columns from it; `formula` can `JSON.parse` the value before reading nested fields. The `"json"` type is documented but STILL UNUSABLE at runtime (verified 2026-06-08) — a field declared `"json"` fails the cell with `"Invalid schema for response_format response: json is not valid under any of the given schemas."` The earlier (2026-05-26) null/`hasOwnProperty` CRASH is gone — the error is clean now — but `json` output remains broken. Until it's fixed, prefer the `string`-with-JSON pattern for any structured or array-shaped field. Note: `llm_web_agents` has a different allowed-types list — see that action-detail file. 4. KEY NOTES - Pricing varies by model — see the credits column in section 8, and read the note above it before treating those numbers as costs. - LEGACY CONFIGS ONLY — a workflow built before a model was retired can still name it, and several retired models don't honour `output_format`. The failure is NOT a clean silent ignore: Floqer creates the declared field slots, but the model's whole raw response is dumped into EVERY declared field rather than parsed into them. If Get Action returns a `model` value that isn't in section 8, switch it to one that is. If you can't, prompt for a single one-line answer, read one field (or `generated_content`), and parse downstream in `formula`. - `output_format` TYPE `json` STILL FAILS AT RUNTIME (verified 2026-06-08). A field declared with the `json` type fails the cell with `"Invalid schema for response_format response: json is not valid under any of the given schemas."` The earlier (2026-05-26) null/`hasOwnProperty` CRASH is gone — the error is clean now — but `json` output is still unusable. Workaround (still required): declare the field as `string`, instruct the model to return JSON inside that string, and `JSON.parse` it downstream (or feed it to `raw_to_structured_array`, which accepts a JSON-encoded array string). - All models populate `generated_content`. `usage` (token + cost telemetry) is populated by OpenAI models and GLM 5.2. `reasoning` is never populated — see section 2. - `output_format` updates `responseConfiguration` at Configure Action time. After PATCHing it, re-fetch with Get Action / Get Action Outputs to see the new fields under `outputs[]` with their `reference` tokens before wiring downstream actions. Readback caveat: the `output_format` field in the Get Action response is a type discriminator string (`"fields"`), not the schema object you sent. The persisted schema is not echoed back — inspect `outputs[]` to see the expanded fields. - To refresh existing rows under the new schema without re-running the whole chain, call Run Action against this action's instance id. Body shape and the run-vs-cascade options: concepts.txt section 7 (Running a workflow). - Writing only, not research. `llm_models` consumes context and produces text — it is not designed to fetch fresh information from the web. If the prompt requires up-to-date facts (recent funding rounds, leadership changes, product launches, news), gather them upstream in a separate action and pipe the structured results into this action's prompt as variable references. Typical sources: `llm_web_agents` for grounded web research with citations, an enrichment action (PDL / store_leads / LinkedIn scrape) for structured firmographics, or a scrape action for a known page. Treat this as a hard separation: the web agent does research, never writing; `llm_models` does writing, never research. Mixing them produces hallucinated content and bypasses the grounding / citations the web agent would have provided. - Prompt structure (keep it scannable). The prompt renders as raw text in the UI and is re-read by whoever maintains the workflow — and clean structure also improves the model's instruction-following. For any prompt past a couple of sentences: - Blank line between every logical block — a period run straight into the next block (`…evidence.Company:`) reads as one wall. - Name multi-step logic with headers (`=== SECTION ===` or `#`), a blank line before and after. - Write allowed-value / IN-OUT criteria as one-per-line bullets, not semicolon-chained prose. - Put each `{{variable}}` on its own labeled line; if it's an opaque id, map id→meaning right there rather than leaving it bare. - Lead with role + task in 1–2 lines; put the output contract (fields, allowed values, length cap) in a dedicated block last. 5. WHERE IT FITS IN A WORKFLOW UPSTREAM — what feeds the prompt Almost any source. Typical patterns: - Enrichment data piped into a prompt for personalisation: enrich_company_linkedin_profile -> llm_models ("write a personalised opener using {{...company_name}} and {{...recent_news}}"). - Scrape outputs piped in for summarisation: scrape_web_page_using_firecrawl -> llm_models ("summarise the page in 3 bullets"). - Direct sheet inputs piped into a classifier: input -> llm_models ("classify this support ticket as one of: bug, feature_request, question"). THIS ACTION Sends the resolved prompt to the chosen model and returns the generated text. Each row runs independently. Cost is per row, per model. DOWNSTREAM — what consumes the output Outreach: llm_models -> instantly_add_to_campaign / reply_add_and_push_to_campaign (personalised email body via custom_variables). CRM updates: llm_models -> hubspot_update_object / salesforce_update_record (write a summary or score onto the contact / opportunity). Filtering / routing: llm_models -> workflow_path_filter (branch on the classifier's output). Further processing: llm_models -> formula (clean / extract structured data from the generated text). 6. WHEN TO USE Use llm_models when the task requires natural-language understanding or generation that deterministic code cannot do well. Personalisation Generate per-row openers, follow-ups, or talking points using upstream enrichment data. The prompt template references the enriched fields; each row's output is unique to that row. Summarisation Compress long unstructured text (scraped pages, transcripts, documents) into a short brief. Use cheap+fast models (GPT 4o Mini, GPT 5.4 Nano, Gemini 3 Flash) for high volume; reach for Claude Sonnet 5 or GPT 5.6 Sol only when the source is complex enough to need it. Classification with reasoning Categorise rows where the rules can't be expressed as a regex or boolean — routing tickets, scoring lead quality, deciding outreach tier from a free-text persona. Structuring unstructured data for a CRM or database Map free-text into a controlled vocabulary your downstream system expects. Pass the allowed values inline in the prompt (e.g. the HubSpot industry list, a lead status enum, segment labels) along with the unstructured upstream data; the LLM returns the best-fit value from the list, ready to write back via hubspot_update_object / salesforce_update_record. Example: an enrichment action returns a free-text company description. The prompt provides the CRM's predefined industry options ("SaaS, Fintech, Healthtech, ...") plus the company description. The LLM picks the closest matching industry, which flows downstream as a clean enum value. Extraction from semi-structured text Pull specific fields (job title, seniority, location intent) out of LinkedIn bios, web copy, or descriptions where the location and format vary by source. Translation / rewriting Re-render text in a different tone, language, or length — polishing, anonymising, simplifying. Scoring as a fallback when fixed math isn't enough `formula` is the default for scoring, counting, and tier classification — it is deterministic, free, and fast, and should be the first choice. In rare cases where the scoring rule genuinely depends on qualitative judgment that can't be expressed as fixed weights — e.g. weighing a $50M Series C heavier than a $5M seed when both are "funding CONFIRMED", or recognising that some signal combinations multiply (new CRO + sales org restructure together is sharper than either alone) — a high-reasoning model (Claude Opus 4.8, GPT 5.6 Sol, GPT 5.5) reading the per-field signal data and producing a score is a viable alternative. Treat this as the exception, not the default. Note this is a different role than a final-step AI summary that writes a brief from already-scored data — that is a writing task and stays an `llm_models` step too, just at the end of the chain. Model selection — quick guidance (credits in brackets; see section 8 for what the number means) Cheap and fast (high volume): GPT 4o Mini [0.33], GPT 5.4 Nano [0.58], Gemini 3 Flash [1.4], GLM 5.2 [2], GPT 5.4 Mini [2.1], GPT 5.6 Luna [2.8], Claude Haiku 4.5 [3]. Balanced: Gemini 3.5 Flash [4], GPT 4.1 [4.4], Gemini 3.1 Pro [5.6], GPT 5.2 [6], GPT 5.4 [7], GPT 5.6 Terra [7]. Deep reasoning: Claude Sonnet 5 [7.5], Claude Opus 4.8 [12.5], GPT 5.6 Sol [14], GPT 5.5 [14]. Web-grounded answers: none — no model in this action searches the web. Use llm_web_agents. 7. WHEN NOT TO USE Skip llm_models when: Deterministic transformations String formatting, date parsing, arithmetic, regex extraction, JSON shaping. Use formula. LLMs are slower, more expensive, and non-deterministic. Simple rule-based filtering "Keep rows where country == US." Use workflow_path_filter — it is instant and free. Web search with citations as the primary need If the answer must be grounded in current web data with sources, use llm_web_agents. It handles the search + citation flow and returns the sources alongside the answer. Browser-driven multi-step tasks Filling forms, clicking through paginated results, scraping behind logins, multi-step site navigation. Use ai_web_navigator (Web Pilot). 8. MODELS REFERENCE Pass the model id (left column) as the value of the `model` field. Any model id not listed here has been retired and can no longer be selected. The credits column is the AVERAGE cost per call shown in the model picker. Billing is by actual token usage and typically lands around 1/10 of the listed average — use these numbers to rank models against each other, not as a per-row cost estimate. OpenAI (returns generated_content + usage; honours output_format) gpt-5.6-sol GPT 5.6 Sol 14 gpt-5.6-terra GPT 5.6 Terra 7 gpt-5.6-luna GPT 5.6 Luna 2.8 gpt-5.5 GPT 5.5 14 gpt-5.4 GPT 5.4 7 gpt-5.4-mini GPT 5.4 Mini 2.1 gpt-5.4-nano GPT 5.4 Nano 0.58 gpt-5.2 GPT 5.2 6 gpt-4.1 GPT 4.1 4.4 gpt-4o-mini GPT 4o Mini 0.33 Anthropic Claude (returns generated_content; honours output_format) claude-opus-4-8 Claude Opus 4.8 12.5 claude-opus-4-7 Claude Opus 4.7 12.5 claude-opus-4-6 Claude Opus 4.6 12.5 claude-opus-4-5-20251101 Claude Opus 4.5 12.5 claude-sonnet-5 Claude Sonnet 5 7.5 claude-sonnet-4-6 Claude Sonnet 4.6 7.5 claude-sonnet-4-5-20250929 Claude Sonnet 4.5 7.5 claude-haiku-4-5 Claude Haiku 4.5 3 Google Gemini (returns generated_content; honours output_format) gemini-3.5-flash Gemini 3.5 Flash 4 gemini-3.1-pro-preview Gemini 3.1 Pro Preview 5.6 gemini-3-flash-preview Gemini 3 Flash Preview 1.4 Baseten (returns generated_content + usage; honours output_format) zai-org/GLM-5.2 GLM 5.2 2 Last updated: 2026-08-18.