{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"AI","product_name":"Treasure Code","type":"markdown"},"seo":{"title":"tdx AI Commands","description":"Discover Treasure AI LLM Proxy models and aliases with tdx ai models. Use tdx ai decision to answer structured questions about text, images, and query results.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"ai-commands","__idx":0},"children":["AI Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provider-neutral commands for the Treasure AI LLM Proxy."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"commands","__idx":1},"children":["Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#models"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["models"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List LLM Proxy models and aliases"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#decision"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["decision"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Answer structured questions about text or images"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"models","__idx":2},"children":["models"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Discover model IDs, capabilities, and aliases from the live LLM Proxy catalog."," ","Models from every family are included by default; deprecated models are hidden."," ","The default output is a styled model list with an aliases section. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]}," ","for the standard tdx grid with capability columns."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx ai models [--all] [--provider <name>] [--feature <name>]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--all"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Include deprecated models"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--provider <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filter models by provider (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["anthropic"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["openai"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google-gemini"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--feature <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filter models and aliases by feature (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v1_messages"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v1_embeddings"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v1_images_generations"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use the standard tdx table format instead of the styled default"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output the catalog as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ models, aliases }"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--limit <n>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Limit displayed models and aliases in styled or table output"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output <file>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Save to a file. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".json"]}," file receives the JSON catalog; other files receive the styled list (or the table with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]},") without colors"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aliases are catalog-wide, so ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--provider"]}," only filters the model table. Aliases"," ","without a feature restriction remain visible with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--feature"]},"."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--jsonl"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--tsv"]}," are not supported for this two-section catalog."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# All active model families\ntdx ai models\n\n# Anthropic models\ntdx ai models --provider anthropic\n\n# Models compatible with Claude Code's --model and --subagent-model\ntdx ai models --feature v1_messages\n\n# Embedding models\ntdx ai models --feature v1_embeddings\n\n# Machine-readable catalog\ntdx ai models --output models.json\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use global ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--profile"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--site"]}," options to select the account and region."," ","The catalog describes proxy models and does not guarantee that your account has"," ","access to every model. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/commands/llm"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx llm models"]}]}," lists account-specific model"," ","settings from the LLM API instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"decision","__idx":3},"children":["decision"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ask structured questions about text or images: yes/no probabilities"," ","(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["predicate"]},"), one of a fixed set of options (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["choice"]},"), or a rating on an"," ","ordered scale (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["score"]},")."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Limited access"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Decisions API is not generally available. It must be enabled for your"," ","account; otherwise the command reports that access is denied."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx ai decision <questions-file> <input-file|-> [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The questions file and input source are positional. No ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--batch"]}," flag is needed:"," ","stdin and JSON/JSONL files are processed one record at a time."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Argument / option"},"children":["Argument / option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<questions-file>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Questions from YAML, or JSON when the file ends in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<input-file|->"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Input file, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-"]}," for JSON/JSONL stdin; omit when using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input"]}," or image-only input"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input <text>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One input text, instead of an input file; produces a single decision"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input-field <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Send only this exact top-level string field; otherwise send the whole row"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--concurrency <n>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum concurrent record requests (default: 16); use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," for sequential processing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--image <path>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attach a local PNG, JPEG, GIF, or WebP image; repeat for multiple images"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--model <id>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Decisions model (default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gpt-6-luna"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Collect record results as a JSON array, or output the single text/image response"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--jsonl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One full result per record (the default for record input)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Summary table for a plain-text file or image-only input"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validate input and preview requests without calling the API"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output <file>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Save output; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".json"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".jsonl"]}," select their respective formats"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"input-formats","__idx":4},"children":["Input formats"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Stdin (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-"]},"):"]}," one JSON object or string per non-blank line (JSONL), or a JSON"," ","array of those records. JSONL is read incrementally; JSON arrays are buffered."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".jsonl"]}," files:"]}," the same JSONL record protocol."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".json"]}," files:"]}," a JSON array, or one object/string record; pretty-printed JSON"," ","is supported."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other files:"]}," the complete UTF-8 contents are one text input, including"," ","newlines. This form can also include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--image"]}," attachments."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, the whole object row is sent as compact JSON text. Select only the"," ","columns you intend to send to the model. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input-field review"]}," sends just that"," ","field while preserving all source columns in the output; the field must be a"," ","non-blank string. String records are sent as their contents. Null, numeric,"," ","boolean, nested-array, and blank-string records are rejected. Blank JSONL lines"," ","are ignored; empty streams/arrays make no requests."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Images are sent inline from local files; URLs are not supported. Images cannot"," ","be combined with JSON/JSONL record input. For image-only input, omit the input"," ","source: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx ai decision questions.yml --image receipt.png"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}," to validate a pipeline before sending requests. Record previews"," ","contain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]},", the original ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["row"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request"]},"; text/image previews contain"," ","the request body with image data shortened. No API calls are made."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Interface change"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The old ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--questions"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--questions-file"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--file"]}," options are removed."," ","Move inline questions into a YAML/JSON file, and pass literal text with"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input \"text\""]},". Raw text on stdin must be encoded as JSON string records."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each question needs a unique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["instructions"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["choice"]}," ","questions list ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["choices"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},"; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["score"]}," questions list"," ","ordered ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["levels"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]}," and optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"# questions.yml\n- name: is_positive\n  type: predicate\n  instructions: Is the customer happy with the product?\n- name: topic\n  type: choice\n  instructions: What is the review mainly about?\n  choices:\n    - { value: price, description: Cost or value for money }\n    - { value: quality, description: Product quality or durability }\n    - { value: shipping, description: Delivery speed or packaging }\n- name: urgency\n  type: score\n  instructions: How urgently should support follow up?\n  levels:\n    - { label: low }\n    - { label: medium }\n    - { label: high, description: Follow up today }\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Process query result rows directly; no mapping or output flags are required.\ntdx query 'SELECT id, review FROM mydb.feedback LIMIT 100' --jsonl \\\n  | tdx ai decision questions.yml -\n\n# Validate the supplied example inputs without sending anything.\ntdx ai decision examples/ai-decision-questions.yml examples/ai-decision-inputs.jsonl --dry-run\n\n# Optional: send only the review and collect results in a JSON file.\ntdx ai decision questions.yml inputs.jsonl --input-field review --output decisions.json\n\n# Single input: one decision (full JSON response, or --table).\ntdx ai decision questions.yml --input \"Love it, will buy again\"\ntdx ai decision questions.yml review.txt --table\n\n# Ask about an image.\ntdx ai decision questions.yml --image receipt.png\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"results-and-failures","__idx":5},"children":["Results and failures"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Record input defaults to ordered JSONL. Each line keeps the zero-based input"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]},", the original ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["row"]},", and the full API ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\"index\":0,\"row\":{\"id\":1,\"review\":\"Excellent\"},\"response\":{\"answers\":[{\"name\":\"is_positive\",\"type\":\"predicate\",\"probability\":0.95}],\"usage\":{\"input_tokens\":42}}}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A one-record JSON source has the same envelope. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}," produces an array of"," ","these results after successful completion. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--input"]}," text, plain-text files,"," ","and image-only inputs retain a single full JSON response by default, or a summary with"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]},". Table output is not supported for record input; TSV is not supported."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Answers are matched to questions by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},": a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["predicate"]}," returns a"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["probability"]},"; a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["choice"]}," returns the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["choice"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["probabilities"]},", and"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["confidence"]},"; a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["score"]}," returns the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["score"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["probabilities"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["confidence"]},"."," ","A question the model declines to answer is returned as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refusal"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["usage"]}," ","reports the input tokens billed for each request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each record makes a separate API call. Records are sent in groups of up to"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--concurrency"]}," (default 16); a group's results are written in input order once"," ","the whole group finishes, so one slow request delays its group. Processing stops on the first invalid"," ","record or API failure, reports the index on stderr, and exits nonzero. Earlier"," ","JSONL results remain available; already-started requests are allowed to finish"," ","and may incur usage. JSON array output is written only after complete success."," ","There are no automatic retries. A malformed streaming record may be discovered"," ","after earlier requests have run, so use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}," when validating new input."," ","Diagnostics never become JSONL records. Output files must not alias a questions,"," ","input, or image file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["💎 Generated with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-work"},"children":["Treasure Work"]}]}]},"headings":[{"value":"AI Commands","id":"ai-commands","depth":1},{"value":"Commands","id":"commands","depth":2},{"value":"models","id":"models","depth":2},{"value":"decision","id":"decision","depth":2},{"value":"Input formats","id":"input-formats","depth":3},{"value":"Results and failures","id":"results-and-failures","depth":3}],"frontmatter":{"seo":{"title":"tdx AI Commands","description":"Discover Treasure AI LLM Proxy models and aliases with tdx ai models. Use tdx ai decision to answer structured questions about text, images, and query results."}},"lastModified":"2026-10-15T01:10:17.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/treasure-code/commands/ai","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}