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
fixed json input on python-sdk
rafaelmmiller881f566bf91e
diff --git a/apps/python-sdk/firecrawl/__init__.py b/apps/python-sdk/firecrawl/__init__.pyindex 7cfa71a72..d1c736a94 100644--- a/apps/python-sdk/firecrawl/__init__.py+++ b/apps/python-sdk/firecrawl/__init__.py@@ -17,7 +17,7 @@ from .v1 import (V1ChangeTrackingOptions,)-__version__ = "4.7.0"+__version__ = "4.8.0"# Define the logger for the Firecrawl projectlogger: logging.Logger = logging.getLogger("firecrawl")diff --git a/apps/python-sdk/firecrawl/__tests__/unit/test_recursive_schema_v1.py b/apps/python-sdk/firecrawl/__tests__/unit/test_recursive_schema_v1.pyindex 890ba42ed..5fb669670 100644--- a/apps/python-sdk/firecrawl/__tests__/unit/test_recursive_schema_v1.py+++ b/apps/python-sdk/firecrawl/__tests__/unit/test_recursive_schema_v1.py@@ -649,7 +649,6 @@ class TestV1ProcessSchemaWithValidation(unittest.TestCase):}result = self.app._process_schema_with_validation(schema_container)self.assertIn("schema", result)- self.assertIn("_model_info", result)def test_process_invalid_schema(self):"""Test processing an invalid schema raises ValueError."""@@ -690,8 +689,6 @@ class TestV1ProcessSchemaWithValidation(unittest.TestCase):}result = self.app._process_schema_with_validation(schema_container)self.assertIn("schema", result)- self.assertIn("_model_info", result)- self.assertEqual(result["_model_info"]["modelName"], "gpt-4o")def test_process_resolves_non_recursive_refs(self):"""Test that non-recursive refs are resolved."""@@ -743,7 +740,6 @@ class TestV1ProcessSchemaWithValidation(unittest.TestCase):schema_key="custom_schema")self.assertIn("custom_schema", result)- self.assertIn("_model_info", result)class TestV1EdgeCases(unittest.TestCase):diff --git a/apps/python-sdk/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py b/apps/python-sdk/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.pyindex 26b9db05e..bbe048642 100644--- a/apps/python-sdk/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py+++ b/apps/python-sdk/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py@@ -611,7 +611,6 @@ class TestValidateJsonFormat(unittest.TestCase):}result = _validate_json_format(format_obj)self.assertIn("schema", result)- self.assertIn("_model_info", result)def test_validate_json_format_with_invalid_schema(self):"""Test JSON format validation with invalid schema."""@@ -654,8 +653,6 @@ class TestValidateJsonFormat(unittest.TestCase):}result = _validate_json_format(format_obj)self.assertIn("schema", result)- self.assertIn("_model_info", result)- self.assertEqual(result["_model_info"]["modelName"], "gpt-4o")def test_validate_json_format_resolves_non_recursive_refs(self):"""Test that non-recursive refs are resolved."""diff --git a/apps/python-sdk/firecrawl/v1/client.py b/apps/python-sdk/firecrawl/v1/client.pyindex 36b0806c3..5f39fa988 100644--- a/apps/python-sdk/firecrawl/v1/client.py+++ b/apps/python-sdk/firecrawl/v1/client.py@@ -3164,11 +3164,6 @@ class V1FirecrawlApp:schema = self._normalize_schema_for_openai(schema)if not self._validate_schema_for_openai(schema):raise ValueError(self.OPENAI_SCHEMA_ERROR_MESSAGE)-- # Add model selection info for reference (non-intrusive)- model_selection = self._select_model_for_schema(schema)- if '_model_info' not in schema_container:- schema_container['_model_info'] = model_selectionschema_container[schema_key] = schemareturn schema_containerdiff --git a/apps/python-sdk/firecrawl/v2/utils/validation.py b/apps/python-sdk/firecrawl/v2/utils/validation.pyindex 2d24954b1..530884954 100644--- a/apps/python-sdk/firecrawl/v2/utils/validation.py+++ b/apps/python-sdk/firecrawl/v2/utils/validation.py@@ -431,11 +431,6 @@ def _validate_json_format(format_obj: Any) -> Dict[str, Any]:if not validate_schema_for_openai(openai_normalized_schema):raise ValueError(OPENAI_SCHEMA_ERROR_MESSAGE)- # Add model selection info for reference (non-intrusive)- model_selection = select_model_for_schema(openai_normalized_schema)- if '_model_info' not in normalized:- normalized['_model_info'] = model_selection-normalized['schema'] = openai_normalized_schemareturn normalized