Parameters for SuiteScript LLM Embedding in NetSuite 2026.1

Starting in NetSuite 2026.1, new parameters for the SuiteScript LLM embedding feature enhance integration with the OCI Generative AI service.

·3 min read·NetSuite 2026.1·View Oracle Docs

TL;DR Opening

Starting in NetSuite 2026.1, the SuiteScript LLM embedding feature introduces new parameters for better control over generating semantic embeddings from text. These enhancements offer developers flexibility in configuring integration with the OCI Generative AI service.

What's New in SuiteScript LLM Parameters

In the 2026.1 release, several new parameters have been introduced in SuiteScript for refining how developers utilize the large language model (LLM) for embedding purposes. Here’s a breakdown of these parameters:

Available Parameters

  • options.inputs (string[]): Required

    • An array of input strings for which you want to get embeddings.
  • options.dimensions (number): Optional

    • Specifies the number of dimensions for the returned embeddings. Ranging from 1 to 1536, this allows developers to adjust the level of detail captured by the embeddings, with 1536 being the default for the supported model.
    • Context Note: The current embed model, Cohere Embed v4.0, outputs embeddings with 1536 dimensions, capturing more nuanced information than its predecessors.
  • options.embedModelFamily (string): Optional

    • Defines the model family to be used. By default, the Cohere Embed model (cohere.embed-v4.0) is applied unless specified otherwise.
  • options.ociConfig (Object): Optional

    • Configuration used for unlimited access through the OCI Generative AI service, allowing integration with Oracle Cloud accounts.

    • Configuration overrides from this parameter will supersede those set in the AI Preferences page within NetSuite.

    • Sub-parameters:

      • compartmentId (string): Identifies the compartment within the Oracle Cloud.
      • endpointId (string): Required for custom AI clusters.
      • fingerprint (string): Only NetSuite secrets are acceptable for this parameter.
      • privateKey (string): Needs to be a NetSuite secret as well.
      • tenancyId (string) & userId (string): Required OCIDs for tenancy and user identification.
  • options.timeout (number): Optional

    • Defines the maximum waiting time for the LLM's response in milliseconds, defaulting at 30 seconds.
  • options.truncate (string): Optional

    • Specifies how to truncate inputs that exceed 512 tokens using defined methods from the llm.Truncate enumeration.

Example Syntax

Here’s a simple representation of how to use the new embedding parameters in a script:

const response = llm.embed({
  inputs: ["Hello World!"],
  embedModelFamily: llm.EmbedModelFamily.COHERE_EMBED,
  dimensions: 512
});

Who This Affects

  • Developers: Those building applications using the N/llm module will find these parameters crucial for optimizing their embedding strategies.
  • Administrators: Configuration of OCI credentials for unlimited usage will require attention to these parameters.

Key Takeaways

  • The SuiteScript LLM embedding parameters in NetSuite 2026.1 allow for flexible configuration with Oracle Cloud AI services.
  • Developers can specify both the dimension size of embeddings and the model family used.
  • OCI configuration details can be managed directly through SuiteScript to ensure unlimited access.
  • Always consider the default settings to avoid unnecessary complexity in your embedded integration.

Frequently Asked Questions (4)

What parameters are required to use the SuiteScript LLM embedding feature?
The only required parameter is 'options.inputs', which is an array of input strings for which you want to get embeddings.
How can I change the default number of dimensions for embeddings in SuiteScript?
You can specify the 'options.dimensions' parameter to adjust the number of dimensions, ranging from 1 to 1536. The default is 1536 dimensions for the Cohere Embed v4.0 model.
Do I need to configure OCI credentials separately for unlimited access when integrating with SuiteScript?
Yes, you need to specify the 'options.ociConfig' parameter with details such as compartmentId and endpointId. These overrides will take precedence over configurations set in the AI Preferences page within NetSuite.
Is the SuiteScript LLM embedding feature compatible with all versions of the Cohere Embed model?
The feature uses the Cohere Embed model v4.0 by default, but you can specify a different model family using the 'options.embedModelFamily' parameter if needed.

Weekly Update History (1)

SuiteScriptadded

Added a new parameter, options.dimensions, to llm.embed(options). This parameter lets you limit the number of dimensions that are returned in generated embeddings.

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

Was this article helpful?