Supported Models for llm.generateText in NetSuite 2026.1

NetSuite 2026.1 introduces supported models for llm.generateText, enhancing text generation capabilities with features like RAG and preambles.

·2 min read·1 views·NetSuite 2026.1·View Oracle Docs

TL;DR Opening

Starting in NetSuite 2026.1, the llm.generateText(options) and llm.generateTextStreamed(options) methods now support various models, enabling enhanced text generation capabilities. These changes are significant as they incorporate retrieval-augmented generation (RAG) and preambles to provide more contextualized outputs for developers.

What's New

NetSuite 2026.1 brings exciting advancements to the SuiteScript API with the introduction of new models for the llm.generateText and llm.generateTextStreamed methods. Below are the supported models and their key capabilities:

EnumValueSupported CapabilitiesNotes
ModelFamily.COHERE_COMMANDcohere.command-a-03-2025Yes (RAG), Yes (Preambles)-
ModelFamily.COHERE_COMMAND_LATESTcohere.command-a-03-2025Yes (RAG), Yes (Preambles)-
ModelFamily.GPT_OSSopenai.gpt-oss-120bNo (RAG), Yes (Preambles)-
ModelFamily.GPT_OSS_LATESTopenai.gpt-oss-120bNo (RAG), Yes (Preambles)-

Key Features

  • Retrieval-Augmented Generation (RAG): This allows documents with text content to be provided using the options.documents parameter. When used, these documents augment the LLM's responses, enhancing the context and relevance of the output. The LLM returns appropriate citations for the information it used.
  • Preambles: You can facilitate a stronger contextual foundation for the LLM's responses by providing a preamble via the options.preamble parameter. This acts as an introductory guide to the model for generating responses according to specific needs.

How to Use the Models

When calling the llm.generateText or its streamed counterpart llm.generateTextStreamed, the primary parameters to consider include:

  • options.prompt: The main input for the LLM that dictates the output.
  • options.documents: List of documents to augment the response (for Cohere models only).
  • options.modelFamily: Specifies which LLM to utilize.

Example Code:

var response = llm.generateText({
    prompt: "Tell me about the history of bears.",
    documents: [/* array of llm.Document objects */],
    modelFamily: llm.ModelFamily.COHERE_COMMAND
});
console.log(response.text);

Who This Affects

  • Developers: Those utilizing the SuiteScript 2.1 framework to build applications that require enhanced text generation capabilities.
  • Administrators: Users managing the settings for SuiteScript and AI configurations.
  • Data Analysts: Professionals needing to leverage text generation for reporting or analytics.

Key Takeaways

  • NetSuite 2026.1 introduces new models for text generation via llm.generateText and llm.generateTextStreamed.
  • The support for RAG and preambles enhances the contextual relevance of generated text.
  • Developers can utilize additional documents to improve output quality, particularly with supported models like Cohere.

Frequently Asked Questions (4)

Are RAG features available for all supported models in llm.generateText?
No, Retrieval-Augmented Generation (RAG) is only supported by the Cohere models. The GPT_OSS models do not support RAG.
What is the purpose of the 'preamble' in the llm.generateText method?
The 'preamble' parameter provides an introductory guide to shape the LLM's responses according to specific needs, establishing a stronger contextual foundation.
Which model should I use to incorporate additional documents into the text generation?
You should use the Cohere models, such as ModelFamily.COHERE_COMMAND, as they support the use of additional documents to augment the text generation response.
Is it necessary to specify a model family when using llm.generateText?
Yes, you need to specify the 'options.modelFamily' parameter to choose which LLM model to utilize for text generation.

Weekly Update History (1)

SuiteScriptupdated

Updated llm.ModelFamily as follows: Added the COHERE_COMMAND and COHERE_COMMAND_LATEST enum values, both of which map to the cohere.command-a-03-2025 model. This model is now the default model when interacting with an LLM using methods in the N/llm module, such as llm.generateText(options). Removed the COHERE_COMMAND_R and COHERE_COMMAND_R_PLUS enum values. If you use these values in existing scripts, their value is now undefined, and method calls will use the new default model instead (cohere.command-a-03-2025).

View Oracle Docs
Source: Values Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?