Models
Overview
The Confident AI SDK exposes every Model method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
Get Model
Returns which model the project uses for the type you ask for. PLATFORM and SIMULATION fall back to the organization's default when the project has no override of its own; EVALUATION is always project scoped. Reading never creates configuration.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.get_model(type="PLATFORM")For async mode, call a_get_model and await it as shown below:
result = await project.a_get_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
type | Literal['EVALUATION', 'PLATFORM', 'SIMULATION', 'TEXT_TO_SPEECH', 'SPEECH_TO_TEXT', 'DECISION', 'SPEECH_TO_SPEECH'] | Required. Which of the project's models to read. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.getModel({ type: "PLATFORM" });Parameters
| Parameter | Type | Description |
|---|---|---|
type | | "EVALUATION" | "PLATFORM" | "SIMULATION" | "TEXT_TO_SPEECH" | "SPEECH_TO_TEXT" | "DECISION" | "SPEECH_TO_SPEECH" | Required. Which of the project's models to read. |
Returns
This method returns an object of type ProjectModel.
Update Evaluation Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The model to run as the project's evaluation model. It takes no maxInputTokens, which is rejected on this path.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdateEvaluationProjectModelRequest
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.update_model(
model_type="platform",
model_config=UpdateEvaluationProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="gemini-2.0-flash",
max_concurrency=5
),
)For async mode, call a_update_model and await it as shown below:
result = await project.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.updateModel(
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "gemini-2.0-flash",
maxConcurrency: 5
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Update Decision Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The project-scoped decision model used by JEVAL metrics. Concurrency and input-token limits are not accepted.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdateDecisionProjectModelRequest
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.update_model(
model_type="platform",
model_config=UpdateDecisionProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="jev-latest"
),
)For async mode, call a_update_model and await it as shown below:
result = await project.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.updateModel(
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "jev-latest"
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Update Platform Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The model to run for platform, simulation, or speech model types.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdatePlatformProjectModelRequest
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.update_model(
model_type="platform",
model_config=UpdatePlatformProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="gemini-2.0-flash",
max_concurrency=5,
max_input_tokens=128000
),
)For async mode, call a_update_model and await it as shown below:
result = await project.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.updateModel(
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "gemini-2.0-flash",
maxConcurrency: 5,
maxInputTokens: 128000
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Delete Model
Removes a project model override and falls back to the organization's default. Evaluation and decision models cannot be cleared. Idempotent when no override exists.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.delete_model(model_type="platform")For async mode, call a_delete_model and await it as shown below:
result = await project.a_delete_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
model_type | str | Required. Which of the project's models to act on. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.deleteModel("platform");Parameters
| Parameter | Type | Description |
|---|---|---|
modelType | string | Required. Which of the project's models to act on. |
Returns
This method returns an object of type ClearProjectModelResult.
Methods (Stateless)
These methods take every argument themselves, so a caller reaches them through client.projects without opening a Project first.
Get Model
Returns which model the project uses for the type you ask for. PLATFORM and SIMULATION fall back to the organization's default when the project has no override of its own; EVALUATION is always project scoped. Reading never creates configuration.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.get_model(
project_id="<PROJECT-ID>",
type="PLATFORM",
)For async mode, call a_get_model and await it as shown below:
result = await client.projects.a_get_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
type | Literal['EVALUATION', 'PLATFORM', 'SIMULATION', 'TEXT_TO_SPEECH', 'SPEECH_TO_TEXT', 'DECISION', 'SPEECH_TO_SPEECH'] | Required. Which of the project's models to read. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.getModel(
"<PROJECT-ID>",
{ type: "PLATFORM" },
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
type | | "EVALUATION" | "PLATFORM" | "SIMULATION" | "TEXT_TO_SPEECH" | "SPEECH_TO_TEXT" | "DECISION" | "SPEECH_TO_SPEECH" | Required. Which of the project's models to read. |
Returns
This method returns an object of type ProjectModel.
Update Evaluation Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The model to run as the project's evaluation model. It takes no maxInputTokens, which is rejected on this path.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdateEvaluationProjectModelRequest
client = ConfidentAI()
result = client.projects.update_model(
project_id="<PROJECT-ID>",
model_type="platform",
model_config=UpdateEvaluationProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="gemini-2.0-flash",
max_concurrency=5
),
)For async mode, call a_update_model and await it as shown below:
result = await client.projects.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const result = await client.projects.updateModel(
"<PROJECT-ID>",
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "gemini-2.0-flash",
maxConcurrency: 5
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Update Decision Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The project-scoped decision model used by JEVAL metrics. Concurrency and input-token limits are not accepted.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdateDecisionProjectModelRequest
client = ConfidentAI()
result = client.projects.update_model(
project_id="<PROJECT-ID>",
model_type="platform",
model_config=UpdateDecisionProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="jev-latest"
),
)For async mode, call a_update_model and await it as shown below:
result = await client.projects.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const result = await client.projects.updateModel(
"<PROJECT-ID>",
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "jev-latest"
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Update Platform Project Model
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
The model to run for platform, simulation, or speech model types.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
from confident_ai.projects import UpdatePlatformProjectModelRequest
client = ConfidentAI()
result = client.projects.update_model(
project_id="<PROJECT-ID>",
model_type="platform",
model_config=UpdatePlatformProjectModelRequest(
provider=ModelProvider.OPEN_AI,
name="gemini-2.0-flash",
max_concurrency=5,
max_input_tokens=128000
),
)For async mode, call a_update_model and await it as shown below:
result = await client.projects.a_update_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
model_type | str | Required. Which of the project's models to act on. |
model_config | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const result = await client.projects.updateModel(
"<PROJECT-ID>",
"platform",
{
provider: ModelProvider.OPEN_AI,
name: "gemini-2.0-flash",
maxConcurrency: 5,
maxInputTokens: 128000
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
modelType | string | Required. Which of the project's models to act on. |
modelConfig | UpdateProjectModelRequest | Required. The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected. Pass one of UpdateEvaluationProjectModelRequest, UpdateDecisionProjectModelRequest, UpdatePlatformProjectModelRequest. See UpdateProjectModelRequest. |
Returns
This method returns an object of type UpdateProjectModelResult.
Delete Model
Removes a project model override and falls back to the organization's default. Evaluation and decision models cannot be cleared. Idempotent when no override exists.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.delete_model(
project_id="<PROJECT-ID>",
model_type="platform",
)For async mode, call a_delete_model and await it as shown below:
result = await client.projects.a_delete_model(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
model_type | str | Required. Which of the project's models to act on. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.deleteModel(
"<PROJECT-ID>",
"platform",
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
modelType | string | Required. Which of the project's models to act on. |
Returns
This method returns an object of type ClearProjectModelResult.
Types
ClearProjectModelResult
Confirmation that the project no longer overrides this model type. source is always organization, since the project now follows the organization's default.
class ClearProjectModelResult:
source: ModelSourcesourceModelSourceRequired
See ModelSource.
interface ClearProjectModelResult {
source: ModelSource;
}sourceModelSourceRequired
See ModelSource.
Model
One model configuration: the provider and model Confident AI calls for a given purpose, with the limits it calls them under. A configuration belongs either to the organization (organizationId set) or to a single project (projectId set), never to both.
class Model:
id: str
type: ModelType
provider: Optional[ModelProvider]
name: Optional[str]
max_concurrency: Optional[int] = Field(alias="maxConcurrency")
max_input_tokens: Optional[int] = Field(alias="maxInputTokens")
project_id: Optional[str] = Field(alias="projectId")
organization_id: Optional[str] = Field(alias="organizationId")idstrRequired
The id of the model configuration, generated by Confident AI.
Example: "<MODEL-ID>"
typeModelTypeRequired
See ModelType.
providerOptional[ModelProvider]Required
The provider the model runs on, or null when your organization's model provider policy stopped allowing the configured provider and Confident AI cleared it.
See ModelProvider.
Example: "GEMINI"
nameOptional[str]Required
The model to call at that provider, or null when the provider's default is used. Always null for CONFIDENT_AI.
Example: "gemini-2.0-flash"
max_concurrencyOptional[int]Required
How many calls Confident AI makes to this model at once, or null for no limit of its own.
Example: 5
max_input_tokensOptional[int]Required
How many input tokens Confident AI sends to this model per call, or null for no limit of its own.
Example: 128000
project_idOptional[str]Required
The id of the project this configuration overrides the organization default for, or null when it is the organization default itself.
organization_idOptional[str]Required
The id of the organization this configuration is the default for, or null when it is a project override.
Example: "<ORGANIZATION-ID>"
interface Model {
id: string;
type: ModelType;
provider: ModelProvider | null;
name: string | null;
maxConcurrency: number | null;
maxInputTokens: number | null;
projectId: string | null;
organizationId: string | null;
}idstringRequired
The id of the model configuration, generated by Confident AI.
Example: "<MODEL-ID>"
typeModelTypeRequired
See ModelType.
providerModelProvider | nullRequired
The provider the model runs on, or null when your organization's model provider policy stopped allowing the configured provider and Confident AI cleared it.
See ModelProvider.
Example: "GEMINI"
namestring | nullRequired
The model to call at that provider, or null when the provider's default is used. Always null for CONFIDENT_AI.
Example: "gemini-2.0-flash"
maxConcurrencynumber | nullRequired
How many calls Confident AI makes to this model at once, or null for no limit of its own.
Example: 5
maxInputTokensnumber | nullRequired
How many input tokens Confident AI sends to this model per call, or null for no limit of its own.
Example: 128000
projectIdstring | nullRequired
The id of the project this configuration overrides the organization default for, or null when it is the organization default itself.
organizationIdstring | nullRequired
The id of the organization this configuration is the default for, or null when it is a project override.
Example: "<ORGANIZATION-ID>"
ModelProvider
This is the provider of the model.
class ModelProvider(Enum):
OPEN_AI = "OPEN_AI"
CUSTOM = "CUSTOM"
CONFIDENT_AI = "CONFIDENT_AI"
BEDROCK = "BEDROCK"
ANTHROPIC = "ANTHROPIC"
GEMINI = "GEMINI"
X_AI = "X_AI"
DEEPSEEK = "DEEPSEEK"
MOONSHOT_AI = "MOONSHOT_AI"
VERTEX_AI = "VERTEX_AI"
AZURE = "AZURE"
MISTRAL = "MISTRAL"
PERPLEXITY = "PERPLEXITY"
OPEN_ROUTER = "OPEN_ROUTER"
PORTKEY = "PORTKEY"
LITE_LLM = "LITE_LLM"
TRUE_FOUNDRY = "TRUE_FOUNDRY"
HUGGING_FACE = "HUGGING_FACE"
TYPE_SAFE = "TYPE_SAFE"
FAL = "FAL"enum ModelProvider {
OPEN_AI = "OPEN_AI",
CUSTOM = "CUSTOM",
CONFIDENT_AI = "CONFIDENT_AI",
BEDROCK = "BEDROCK",
ANTHROPIC = "ANTHROPIC",
GEMINI = "GEMINI",
X_AI = "X_AI",
DEEPSEEK = "DEEPSEEK",
MOONSHOT_AI = "MOONSHOT_AI",
VERTEX_AI = "VERTEX_AI",
AZURE = "AZURE",
MISTRAL = "MISTRAL",
PERPLEXITY = "PERPLEXITY",
OPEN_ROUTER = "OPEN_ROUTER",
PORTKEY = "PORTKEY",
LITE_LLM = "LITE_LLM",
TRUE_FOUNDRY = "TRUE_FOUNDRY",
HUGGING_FACE = "HUGGING_FACE",
TYPE_SAFE = "TYPE_SAFE",
FAL = "FAL",
}OPEN_AI · CUSTOM · CONFIDENT_AI · BEDROCK · ANTHROPIC · GEMINI · X_AI · DEEPSEEK · MOONSHOT_AI · VERTEX_AI · AZURE · MISTRAL · PERPLEXITY · OPEN_ROUTER · PORTKEY · LITE_LLM · TRUE_FOUNDRY · HUGGING_FACE · TYPE_SAFE · FAL
ModelSource
Where the model in effect for a project comes from: project when the model is project scoped or has a project override, and organization when it follows the organization's default.
class ModelSource(Enum):
PROJECT = "project"
ORGANIZATION = "organization"enum ModelSource {
PROJECT = "project",
ORGANIZATION = "organization",
}PROJECT · ORGANIZATION
ModelType
What a configured model is used for. EVALUATION is the LLM judge that scores a project's metrics, PLATFORM is the model behind Confident AI's own AI features such as classification, summaries and report generation, and SIMULATION is the model that simulates user turns in conversation simulations. Those three are the only types the public API reads or writes.
class ModelType(Enum):
EVALUATION = "EVALUATION"
PLATFORM = "PLATFORM"
GENERATION = "GENERATION"
SIMULATION = "SIMULATION"
TEXT_TO_SPEECH = "TEXT_TO_SPEECH"
SPEECH_TO_TEXT = "SPEECH_TO_TEXT"
DECISION = "DECISION"
SPEECH_TO_SPEECH = "SPEECH_TO_SPEECH"enum ModelType {
EVALUATION = "EVALUATION",
PLATFORM = "PLATFORM",
GENERATION = "GENERATION",
SIMULATION = "SIMULATION",
TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
SPEECH_TO_TEXT = "SPEECH_TO_TEXT",
DECISION = "DECISION",
SPEECH_TO_SPEECH = "SPEECH_TO_SPEECH",
}EVALUATION · PLATFORM · GENERATION · SIMULATION · TEXT_TO_SPEECH · SPEECH_TO_TEXT · DECISION · SPEECH_TO_SPEECH
ProjectModel
The model the project actually runs for one type, whether that is its own override or the organization's default.
class ProjectModel:
model: Optional[Model]
source: ModelSourcemodelOptional[Model]Required
The model in effect for the project, or null when nothing has been configured for that type — which for PLATFORM and SIMULATION means neither the project nor the organization has set one.
See Model.
sourceModelSourceRequired
See ModelSource.
interface ProjectModel {
model: Model | null;
source: ModelSource;
}modelModel | nullRequired
The model in effect for the project, or null when nothing has been configured for that type — which for PLATFORM and SIMULATION means neither the project nor the organization has set one.
See Model.
sourceModelSourceRequired
See ModelSource.
UpdateProjectModelRequest
The model to run for the type named in the path. The accepted shape is determined by modelType: decision accepts only provider and name, evaluation also accepts max concurrency, and platform, simulation, and speech models also accept max input tokens. This replaces the whole configuration rather than patching it. CUSTOM is rejected.
UpdateProjectModelRequest = Union[
UpdateEvaluationProjectModelRequest,
UpdateDecisionProjectModelRequest,
UpdatePlatformProjectModelRequest,
]type UpdateProjectModelRequest =
| UpdateEvaluationProjectModelRequest
| UpdateDecisionProjectModelRequest
| UpdatePlatformProjectModelRequest;A UpdateProjectModelRequest is one of the shapes below. Send the fields of one of them, never a mix of both.
The model to run as the project's evaluation model. It takes no maxInputTokens, which is rejected on this path.
class UpdateEvaluationProjectModelRequest:
provider: ModelProvider
name: Optional[str] = None
max_concurrency: Optional[int] = Field(default=None, alias="maxConcurrency")providerModelProviderRequired
See ModelProvider.
nameOptional[str]
The model to call at that provider, for example gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored for CONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example @openai-prod/gpt-4o.
Example: "gemini-2.0-flash"
max_concurrencyOptional[int]
How many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
Example: 5
interface UpdateEvaluationProjectModelRequest {
provider: ModelProvider;
name?: string;
maxConcurrency?: number | null;
}providerModelProviderRequired
See ModelProvider.
namestring
The model to call at that provider, for example gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored for CONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example @openai-prod/gpt-4o.
Example: "gemini-2.0-flash"
maxConcurrencynumber | null
How many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
Example: 5
The project-scoped decision model used by JEVAL metrics. Concurrency and input-token limits are not accepted.
class UpdateDecisionProjectModelRequest:
provider: ModelProvider
name: Optional[str] = NoneproviderModelProviderRequired
See ModelProvider.
nameOptional[str]
The TypeSafe decision model to use. Omit it when using the Confident AI default.
Example: "jev-latest"
interface UpdateDecisionProjectModelRequest {
provider: ModelProvider;
name?: string;
}providerModelProviderRequired
See ModelProvider.
namestring
The TypeSafe decision model to use. Omit it when using the Confident AI default.
Example: "jev-latest"
The model to run for platform, simulation, or speech model types.
class UpdatePlatformProjectModelRequest:
provider: ModelProvider
name: Optional[str] = None
max_concurrency: Optional[int] = Field(default=None, alias="maxConcurrency")
max_input_tokens: Optional[int] = Field(default=None, alias="maxInputTokens")providerModelProviderRequired
See ModelProvider.
nameOptional[str]
The model to call at that provider, for example gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored for CONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example @openai-prod/gpt-4o.
Example: "gemini-2.0-flash"
max_concurrencyOptional[int]
How many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
Example: 5
max_input_tokensOptional[int]
How many input tokens Confident AI may send to this model per call. The platform, simulation and speech models only: sending it on the evaluation path is rejected. Omit it or send null for no limit of its own.
Example: 128000
interface UpdatePlatformProjectModelRequest {
provider: ModelProvider;
name?: string;
maxConcurrency?: number | null;
maxInputTokens?: number | null;
}providerModelProviderRequired
See ModelProvider.
namestring
The model to call at that provider, for example gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored for CONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example @openai-prod/gpt-4o.
Example: "gemini-2.0-flash"
maxConcurrencynumber | null
How many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
Example: 5
maxInputTokensnumber | null
How many input tokens Confident AI may send to this model per call. The platform, simulation and speech models only: sending it on the evaluation path is rejected. Omit it or send null for no limit of its own.
Example: 128000
UpdateProjectModelResult
The project's model as it now stands. source is returned for the platform and simulation models, where the write creates a project override and so answers which scope now wins; the evaluation model is always project scoped and omits it.
class UpdateProjectModelResult:
model: Model
source: Optional[ModelSource] = NonemodelModelRequired
See Model.
sourceOptional[ModelSource]
See ModelSource.
interface UpdateProjectModelResult {
model: Model;
source?: ModelSource;
}modelModelRequired
See Model.
sourceModelSource
See ModelSource.
Last updated on