Skip to content

Connect a model

Pluto Core does not call any model provider by itself. A model adapter does. Pluto Model Adapters ships one adapter, OpenAIResponsesModelProvider. It works with OpenAI and with any endpoint that serves the OpenAI Responses API, such as Azure OpenAI.

For another provider, a developer writes an IModelProvider class. See Extend Pluto.

  1. Install the Pluto Model Adapters package. See Install.
  2. In Setup, open Named Credentials, then the External Credentials tab, then OpenAIEC.
  3. Under Principals, edit the OpenAI principal. Add an authentication parameter named OpenAIKey with your API key as its value. Save.
  4. Assign the AgentModelAdapters permission set to every user a run can act as: each execution user, and each person who starts an agent that has no Agent Execution Identity. It gives them use of the key.
  5. Create the Agent Model record. See Create the Agent Model.

The key stays in the External Credential. It never appears in source, logs, or run records.

The adapter calls /v1/responses under the Named Credential’s URL. The URL carries the host and any base path.

  1. In Setup, create an External Credential with the Custom authentication protocol. Add a principal.
  2. Add a custom header named api-key whose value is your Azure key.
  3. Create a Named Credential with the URL https://<your-resource>.openai.azure.com/openai and that External Credential.
  4. In a permission set, give External Credential Principal Access to the principal from step 1. Assign it to the same users as in step 4 of Connect OpenAI.
  5. Create the Agent Model record with your Named Credential, and the Azure deployment name as the Model Identifier.

An Agent Model is a custom metadata record. Agents name it in their Model field.

  1. In Setup, open Custom Metadata Types, then Agent Model, then Manage Records.

  2. Click New and fill in:

    FieldValue
    Label and Agent Model NameA name such as OpenAI_GPT_5. Agents use the Agent Model Name.
    Model Adapter ClassOpenAIResponsesModelProvider
    Named CredentialOpenAI_API, or your own Named Credential’s API name
    Model IdentifierThe provider’s exact model name, such as gpt-5. It is case-sensitive.
    ActiveChecked
    Max Output TokensOptional. Blank uses 8,000.
    Input and Output Price per Million TokensOptional. Set both to record an estimated cost on each model call.
  3. Save.

ItemValue
Time per model callOne callout, limited by the agent’s Model Timeout. The most is 120 seconds, the Apex callout limit.
Longest answerMax Output Tokens, including the model’s reasoning. Blank is 8,000.
Temporary provider errorsRetried, up to the agent’s Max Retries.
An answer cut off at the limitThe run pauses with MODEL_OUTPUT_TRUNCATED. Raise Max Output Tokens, then rescue the run.
The provider refuses to answerThe run pauses with MODEL_REFUSED.
Wrong or missing keyThe run pauses. The error names “the model endpoint” and the HTTP status. A 401 or 403 means: check the External Credential.

The largest models can come close to 120 seconds on long turns. For agents a person waits on, choose a faster model.

A run uses only the model on its agent. Pluto never falls back to another model on its own.

Pluto is licensed under the GNU Affero General Public License, version 3 only.