Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
docs(agent): mark spark-1 models deprecated, cover both aliases in the agent snip (#4878)
Gergő Móriczae6b897fb01b
diff --git a/README.md b/README.mdindex b35496088..ab3b8d9e0 100644--- a/README.md+++ b/README.md@@ -402,31 +402,11 @@ result = app.agent(Every effort level runs the `spark-2` model. Effort changes the reasoningbudget, not the model.-#### Model Selection (Legacy)+#### Model-`model` still works, and it stays supported. Send `model` or `effort`, not-both. A request with both fields returns a 400 error.--| Model | Cost | Best For |-|-------|------|----------|-| `spark-1-mini` | 60% cheaper | Most tasks |-| `spark-1-pro` (default) | Standard | Complex research, critical data gathering |-| `spark-2` | See [pricing](https://docs.firecrawl.dev/features/agent) | The model that `effort` runs |--```python-result = app.agent(- prompt="Compare enterprise features across Firecrawl, Apify, and ScrapingBee",- model="spark-1-pro"-)-```--A request without `model` and without `effort` runs `spark-1-pro`.--**When to use Pro:**-- Comparing data across multiple websites-- Extracting from sites with complex navigation or auth-- Research tasks where the agent needs to explore multiple paths-- Critical data where accuracy is paramount+Every agent run executes on `spark-2`, the default, so you don't need to set+`model`. The retired `spark-1-pro` and `spark-1-mini` names are still accepted+for backwards compatibility, but they are deprecated and run `spark-2`.Learn more about Spark models in our [Agent documentation](https://docs.firecrawl.dev/features/agent).diff --git a/apps/api/src/__tests__/snips/v2/agent-effort.test.ts b/apps/api/src/__tests__/snips/v2/agent-effort.test.tsindex 7694b056e..a5f80be92 100644--- a/apps/api/src/__tests__/snips/v2/agent-effort.test.ts+++ b/apps/api/src/__tests__/snips/v2/agent-effort.test.ts@@ -175,18 +175,18 @@ describeIf(REQUIRES_FIRE_ENGINE && REQUIRES_AI && HAS_AGENT_BETA)(scrapeTimeout,);- it(- "redirects a retired spark-1 preset to spark-2",- async () => {+ it.each(["spark-1-pro", "spark-1-mini"])(+ "redirects the deprecated %s alias to spark-2",+ async model => {const response = await agentRaw({urls: [TEST_SUITE_WEBSITE],prompt: "What does this page offer?",- model: "spark-1-pro",+ model,});if (response.statusCode !== 200) {console.warn(- "Agent request with model spark-1-pro did not succeed",+ `Agent request with model ${model} did not succeed`,JSON.stringify(response.body, null, 2),);}diff --git a/apps/java-sdk/src/main/java/com/firecrawl/models/AgentOptions.java b/apps/java-sdk/src/main/java/com/firecrawl/models/AgentOptions.javaindex 336a85f06..cf5cea2d3 100644--- a/apps/java-sdk/src/main/java/com/firecrawl/models/AgentOptions.java+++ b/apps/java-sdk/src/main/java/com/firecrawl/models/AgentOptions.java@@ -64,7 +64,7 @@ public class AgentOptions {public Builder maxCredits(Integer maxCredits) { this.maxCredits = maxCredits; return this; }/** Don't navigate outside provided URLs. */public Builder strictConstrainToURLs(Boolean strictConstrainToURLs) { this.strictConstrainToURLs = strictConstrainToURLs; return this; }- /** Agent model: "spark-1-pro" (default), "spark-1-mini", or "spark-2". */+ /** Agent model: "spark-2" (default). "spark-1-pro" and "spark-1-mini" are deprecated and run spark-2. */public Builder model(String model) { this.model = model; return this; }/** Reasoning effort: "low", "medium", or "high". Sets the reasoning budget (every level runs spark-2). */public Builder effort(String effort) { this.effort = effort; return this; }diff --git a/apps/js-sdk/firecrawl/src/v2/methods/agent.ts b/apps/js-sdk/firecrawl/src/v2/methods/agent.tsindex 0d09745c0..e2f323c28 100644--- a/apps/js-sdk/firecrawl/src/v2/methods/agent.ts+++ b/apps/js-sdk/firecrawl/src/v2/methods/agent.ts@@ -12,6 +12,7 @@ function prepareAgentPayload(args: {origin?: string;maxCredits?: number;strictConstrainToURLs?: boolean;+ /** Defaults to spark-2. "spark-1-pro" and "spark-1-mini" are deprecated and run spark-2. */model?: "spark-1-pro" | "spark-1-mini" | "spark-2";effort?: AgentEffort;webhook?: string | AgentWebhookConfig;diff --git a/apps/python-sdk/firecrawl/v2/client.py b/apps/python-sdk/firecrawl/v2/client.pyindex dc0b09ac3..583343230 100644--- a/apps/python-sdk/firecrawl/v2/client.py+++ b/apps/python-sdk/firecrawl/v2/client.py@@ -1519,7 +1519,7 @@ class FirecrawlClient:schema: Target JSON schema for the output (dict or Pydantic BaseModel)integration: Integration tag/namemax_credits: Maximum credits to use (optional)- model: Model to use for the agent ("spark-1-pro" (default), "spark-1-mini", or "spark-2")+ model: Model to use for the agent ("spark-2", the default; "spark-1-pro" and "spark-1-mini" are deprecated and run spark-2)effort: Reasoning effort for the agent ("low", "medium", or "high")webhook: Webhook URL or configuration for notificationsthreat_protection: Enterprise per-request override of the team's@@ -1579,7 +1579,7 @@ class FirecrawlClient:poll_interval: Seconds between status checkstimeout: Maximum seconds to wait (None for no timeout)max_credits: Maximum credits to use (optional)- model: Model to use for the agent ("spark-1-pro" (default), "spark-1-mini", or "spark-2")+ model: Model to use for the agent ("spark-2", the default; "spark-1-pro" and "spark-1-mini" are deprecated and run spark-2)effort: Reasoning effort for the agent ("low", "medium", or "high")webhook: Webhook URL or configuration for notificationsthreat_protection: Enterprise per-request override of the team'sdiff --git a/apps/rust-sdk/examples/example.rs b/apps/rust-sdk/examples/example.rsindex 57b418e93..d32fd00c7 100644--- a/apps/rust-sdk/examples/example.rs+++ b/apps/rust-sdk/examples/example.rs@@ -159,7 +159,7 @@ async fn main() {urls: Some(vec!["https://example.com".to_string()]),prompt: "Describe what this website is about and list any key features mentioned".to_string(),- model: Some(AgentModel::Spark1Pro),+ model: Some(AgentModel::Spark2),timeout: Some(60),..Default::default()};diff --git a/apps/rust-sdk/src/agent.rs b/apps/rust-sdk/src/agent.rsindex 44965f942..3d1013e0b 100644--- a/apps/rust-sdk/src/agent.rs+++ b/apps/rust-sdk/src/agent.rs@@ -36,7 +36,7 @@ pub struct AgentOptions {/// Strictly constrain the agent to the provided URLs.pub strict_constrain_to_urls: Option<bool>,- /// Agent model to use. Defaults to `spark-1-pro` server-side when unset.+ /// Agent model to use. Defaults to `spark-2` server-side when unset.pub model: Option<AgentModel>,/// Reasoning effort for the agent task. Every level runs spark-2.@@ -726,7 +726,7 @@ impl Client {/// }/// }/// })),- /// model: Some(AgentModel::Spark1Pro),+ /// model: Some(AgentModel::Spark2),/// poll_interval: Some(3000),/// timeout: Some(300),/// ..Default::default()diff --git a/apps/rust-sdk/src/types.rs b/apps/rust-sdk/src/types.rsindex dd14bf052..abd73cc92 100644--- a/apps/rust-sdk/src/types.rs+++ b/apps/rust-sdk/src/types.rs@@ -991,8 +991,10 @@ pub enum SitemapMode {#[derive(Deserialize, Serialize, Clone, Copy, Debug, PartialEq, Eq)]#[serde(rename_all = "kebab-case")]pub enum AgentModel {+ /// Deprecated: the server runs spark-2 for this value.#[serde(rename = "spark-1-pro")]Spark1Pro,+ /// Deprecated: the server runs spark-2 for this value.#[serde(rename = "spark-1-mini")]Spark1Mini,#[serde(rename = "spark-2")]