Language Characteristics
Agent Script Blocks
Specify Different Models
Flow of Control
Manage Agents
Download Documentation
Examples
By default, Agentforce uses the org-level model selected in Setup for all agents and subagents. To use a different model for a specific agent or subagent, override the default with model_config.
1model_config:
2 model://sfdc_ai__DefaultBedrockAnthropicClaude45Haiku"Specify any supported model. To test your model selections, use different models in different versions of your agent.
sfdc_ai__DefaultGPT41), Claude Haiku 4.5 (sfdc_ai__DefaultBedrockAnthropicClaude45Haiku), or Gemini 3.5 Flash (sfdc_ai__DefaultVertexAIGemini35Flash) because these models have been thoroughly tested with agents.Important
Use model_config to override the org-level default model for the agent.
1system:
2 instructions: "You are an AI Agent."
3 messages:
4 welcome: Hi, I'm an AI service assistant. How can I help you?
5 error: "Sorry, it looks like something has gone wrong."
6model_config:
7 model://sfdc_ai__DefaultBedrockAnthropicClaude45Haiku"Use model_config in a subagent to override the org-level or agent-level model for the subagent.
1subagent ReservationManagement:
2 description: "Handles requests to create new reservations for customers at their desired time slots."
3 model_config:
4 model://sfdc_ai__DefaultBedrockAnthropicClaude45Haiku"Some agent templates, such as Agentforce Service agent, use the Salesforce-owned EinsteinHyperClassifier model for subagent classification in the agent router. Keep that model or specify a different model in your agent router.
1start_agent agent_router:
2 description: "Welcome the user and determine the appropriate subagent based on user input"
3 model_config:
4 model: "model://sfdc_ai__DefaultGPT41"You can specify multiple models in the same agent. A subagent-specific model takes precedence over an agent-specific model.
Suppose that your org, agent, and subagent have these models specified:
In this example, Agentforce uses Gemini 3.1 Pro for the HandleReservation subagent. For all other subagents in the MyTestAgent, Agentforce uses Claude Haiku 4.5. For other agents in the same org, Agentforce uses the Salesforce default model.
The EinsteinHyperClassifier model, developed by Salesforce, is often used for subagent classification in the agent_router subagent. The advantages of using EinsteinHyperClassifier for subagent classification are:
Limitations of using the EinsteinHyperClassifier model:
before_reasoning or after_reasoning.@utils.transition, but no other tools.