SuiteScript
NetSuite 2024.2
2026-07-23

N/llm ModelFamily Enum: Available LLM Models and Capability Matrix

The N/llm module exposes an llm.ModelFamily enum with four members mapping to two underlying models (Cohere Command A and GPT-OSS 120B), each with different RAG and preamble support.

Affects:SuiteScript 2.1N/llm

What changed

The N/llm module (introduced in 2024.2) provides server-side access to large language models via llm.generateText(options) and llm.generateTextStreamed(options) (plus their promise-based variants). The llm.ModelFamily enum controls which model backs the call.

Available model families

  • ModelFamily.COHERE_COMMANDcohere.command-a-03-2025 — supports RAG and Preambles
  • ModelFamily.COHERE_COMMAND_LATEST → currently resolves to cohere.command-a-03-2025 — supports RAG and Preambles
  • ModelFamily.GPT_OSSopenai.gpt-oss-120b — supports Preambles only (no RAG)
  • ModelFamily.GPT_OSS_LATEST → currently resolves to openai.gpt-oss-120b — supports Preambles only (no RAG)

The _LATEST aliases are pointers that Oracle can retarget to newer model versions without a code change on your side. The non-_LATEST variants are pinned.

Capability details

  • RAG — pass an array of llm.Document objects via options.documents. The model uses them as grounding context and returns llm.Citation objects referencing the source material. Only Cohere Command supports this today.
  • Preambles — pass a string via options.preamble to set system-level instructions or context before the prompt. Both model families support this.

What this means in practice

If your use case requires document-grounded responses with citations (RAG), you must use a COHERE_COMMAND variant. Passing options.documents to a GPT_OSS model family will not work as expected since RAG is not a supported capability for that model.

What to do

  1. If you are already using the N/llm module, verify which ModelFamily value you are passing. Confirm it supports the capabilities you rely on (RAG vs. preamble-only).
  2. Decide whether to pin to a specific model version (e.g., ModelFamily.COHERE_COMMAND) or use the _LATEST alias. Pinning gives you predictable behavior across releases; _LATEST lets Oracle upgrade the underlying model without a script change, but may introduce behavioral differences.
  3. Note that this module is SuiteScript 2.1 only. It is not available in SuiteScript 2.0 or 1.0.
  4. Oracle has not published governance-unit costs for llm.generateText in this reference page. Test in Sandbox and monitor governance consumption before deploying to production. Check the Model Parameter Values by LLM reference (linked from the source docs) for any token or parameter limits.