Repository: SigmaNight/basiliskLLM
Pull request #567: feat(model) add missing models and introducing reasoning
Author: login: kevinderome
Created: 2025-03-02T00:51:23Z | Merged: 2025-03-03T07:59:45Z

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Enabled advanced reasoning support across AI models, enhancing the system’s ability to process and deliver thoughtful responses.
  - Expanded the model lineup by introducing new options optimized for creative tasks, featuring extended context windows, output capacities, and vision capabilities, including the new "gpt-4.5-preview" model.
  - Enhanced real-time and batch processing to include streamlined handling of dynamic “thinking” content in responses.
  - Added new model instances for "Claude 3.7 Sonnet (thinking)" and "Claude 3.7 Sonnet" with enhanced capabilities.
  - Introduced a new boolean attribute for reasoning support in the AI model configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/basilisk/provider_ai_model.py b/basilisk/provider_ai_model.py
index cd880d3a5..50135de7a 100644
--- a/basilisk/provider_ai_model.py
+++ b/basilisk/provider_ai_model.py
@@ -20,6 +20,7 @@ class ProviderAIModel:
 		max_output_tokens: The maximum number of output tokens for the AI model.
 		max_temperature: The maximum temperature for the AI model.
 		default_temperature: The default temperature for the AI model.
+		reasoning: Whether the AI model supports reasoning.
 		vision: Whether the AI model supports vision.
 		extra_info: Additional information for the AI model.
 	"""
@@ -32,6 +33,7 @@ class ProviderAIModel:
 	max_temperature: float = field(default=1.0)
 	default_temperature: float = field(default=1.0)
 	vision: bool = field(default=False)
+	reasoning: bool = field(default=False)
 	extra_info: dict[str, Any] = field(default_factory=dict)
 
 	@property
diff --git a/basilisk/provider_engine/anthropic_engine.py b/basilisk/provider_engine/anthropic_engine.py
index 3ee6f55d2..f9d6570a2 100644
--- a/basilisk/provider_engine/anthropic_engine.py
+++ b/basilisk/provider_engine/anthropic_engine.py
@@ -90,6 +90,25 @@ def models(self) -> list[ProviderAIModel]:
 		log.debug("Getting Anthropic models")
 		# See <https://docs.anthropic.com/en/docs/about-claude/models>
 		return [
+			ProviderAIModel(
+				id="claude-3-7-sonnet-latest_reasoning",
+				name="Claude 3.7 Sonnet (thinking)",
+				# Translators: This is a model description
+				description=_("Our most intelligent model"),
+				context_window=200000,
+				max_output_tokens=64000,
+				vision=True,
+				reasoning=True,
+			),
+			ProviderAIModel(
+				id="claude-3-7-sonnet-latest",
+				name="Claude 3.7 Sonnet",
+				# Translators: This is a model description
+				description=_("Our most intelligent model"),
+				context_window=200000,
+				max_output_tokens=8192,
+				vision=True,
+			),
 			ProviderAIModel(
 				id="claude-3-5-sonnet-latest",
 				name="Claude 3.5 Sonnet",
@@ -273,6 +292,13 @@ def completion(
 		}
 		if system_message:
 			params["system"] = system_message.content
+		if model.reasoning:
+			params.pop("top_p", None)
+			params["model"] = model.id.replace("_reasoning", "")
+			params["thinking"] = {
+				"type": "enabled",
+				"budget_tokens": kwargs.get("budget_tokens", 16000),
+			}
 		params.update(kwargs)
 		response = self.client.messages.create(**params)
 		return response
@@ -311,28 +337,71 @@ def _handle_citation(self, citation: dict) -> dict:
 				log.warning(f"Unsupported citation type: {citation.type}")
 		return citation_chunk_data
 
+	def _handle_thinking(
+		self, started: bool, event: MessageStreamEvent
+	) -> tuple[str, bool]:
+		"""Handles the 'thinking' content in the API response.
+
+		Args:
+			started: Flag indicating if thinking content has started.
+			event: Event data from the API response.
+
+		Returns:
+			Tuple containing the thinking content and updated started flag.
+		"""
+		if not started:
+			started = True
+			content = f"```think\n {event.delta.thinking}"
+			return content, started
+		else:
+			return event.delta.thinking, started
+
 	def completion_response_with_stream(
 		self, stream: Stream[MessageStreamEvent]
 	) -> Iterator[TextBlock | dict]:
 		"""Processes streaming response from Anthropic API.
 
 		Args:
-			stream: Stream of message events from the API.
+				stream: Stream of message events from the API.
 
 		Yields:
-			Text content from each event.
+			Text content from each event or thinking content.
 		"""
+		thinking_content_started = False
+		current_block_type = None
 		for event in stream:
 			match event.type:
+				case "content_block_start":
+					current_block_type = event.content_block.type
+				case "content_block_stop":
+					if (
+						thinking_content_started
+						and current_block_type == "thinking"
+					):
+						thinking_content_started = False
+						yield "\n```\n\n"
 				case "content_block_delta":
 					match event.delta.type:
 						case "text_delta":
 							yield event.delta.text
+						case "thinking_delta":
+							text, thinking_content_started = (
+								self._handle_thinking(
+									thinking_content_started, event
+								)
+							)
+							yield text
 						case "citations_delta":
 							yield (
 								"citation",
 								self._handle_citation(event.delta.citation),
 							)
+				case "message_stop":
+					if thinking_content_started:
+						yield "\n```\n"
+					break
+
+	# ruff: noqa: C901
 
 	def completion_response_without_stream(
 		self, response: AnthropicMessage, new_block: MessageBlock, **kwargs
@@ -349,14 +418,22 @@ def completion_response_without_stream(
 		"""
 		citations = []
 		text = []
+		thinking_content = None
+		if hasattr(response, "thinking") and response.thinking:
+			thinking_content = response.thinking
 		for content in response.content:
 			if content.citations:
 				for citation in content.citations:
 					citations.append(self._handle_citation(citation))
 			text.append(content.text)
+		final_content = ''.join(text)
+		if thinking_content:
+			final_content = (
+				f"```think\n{thinking_content}\n```\n\n{final_content}"
+			)
 		new_block.response = Message(
 			role=MessageRoleEnum.ASSISTANT,
-			content=''.join(text),
+			content=final_content,
 			citations=citations,
 		)
 		return new_block
diff --git a/basilisk/provider_engine/deepseek_engine.py b/basilisk/provider_engine/deepseek_engine.py
index 555f3d666..a54f3ddc0 100644
--- a/basilisk/provider_engine/deepseek_engine.py
+++ b/basilisk/provider_engine/deepseek_engine.py
@@ -63,6 +63,7 @@ def models(self) -> list[ProviderAIModel]:
 				max_temperature=2.0,
 				default_temperature=1.0,
 				max_output_tokens=8000,
+				reasoning=True,
 			),
 		]
 		return models
diff --git a/basilisk/provider_engine/openai_engine.py b/basilisk/provider_engine/openai_engine.py
index 797ba6d66..05a4f1ab0 100644
--- a/basilisk/provider_engine/openai_engine.py
+++ b/basilisk/provider_engine/openai_engine.py
@@ -99,8 +99,21 @@ def models(self) -> list[ProviderAIModel]:
 		log.debug("Getting openAI models")
 		# See <https://platform.openai.com/docs/models>
 		return [
+			ProviderAIModel(
+				id="gpt-4.5-preview",
+				name="GPT 4.5",
+				# Translators: This is a model description
+				description=_(
+					"Largest GPT model, good for creative tasks and agentic planning"
+				),
+				context_window=128000,
+				max_output_tokens=16384,
+				vision=True,
+				max_temperature=2.0,
+			),
 			ProviderAIModel(
 				id="gpt-4o",
+				name="GPT 4o",
 				# Translators: This is a model description
 				description=_(
 					"Points to one of the most recent iterations of gpt-4o-mini model"
@@ -112,6 +125,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="chatgpt-4o-latest",
+				name="ChatGPT 4o",
 				# Translators: This is a model description
 				description=_(
 					"Dynamic model continuously updated to the current version of GPT-4o in ChatGPT"
@@ -123,6 +137,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4o-mini",
+				name="GPT 4o Mini",
 				# Translators: This is a model description
 				description=_(
 					"Points to one of the most recent iterations of gpt-4o-mini model"
@@ -134,6 +149,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="o3-mini",
+				name="o3 Mini",
 				# Translators: This is a model description
 				description=_(
 					"Our most recent small reasoning model, providing high intelligence at the same cost and latency targets of o1-mini. o3-mini also supports key developer features, like Structured Outputs, function calling, Batch API, and more. Like other models in the o-series, it is designed to excel at science, math, and coding tasks."
@@ -141,10 +157,12 @@ def models(self) -> list[ProviderAIModel]:
 				context_window=200000,
 				max_output_tokens=100000,
 				vision=True,
+				reasoning=True,
 				max_temperature=2.0,
 			),
 			ProviderAIModel(
 				id="o1",
+				name="o1",
 				# Translators: This is a model description
 				description=_(
 					"Points to the most recent snapshot of the o1 model"
@@ -152,19 +170,23 @@ def models(self) -> list[ProviderAIModel]:
 				context_window=200000,
 				max_output_tokens=100000,
 				vision=True,
+				reasoning=True,
 				max_temperature=2.0,
 			),
 			ProviderAIModel(
 				id="o1-mini",
+				name="o1 Mini",
 				# Translators: This is a model description
 				description=_("Points to the most recent o1-mini snapshot"),
 				context_window=128000,
 				max_output_tokens=65536,
 				vision=True,
+				reasoning=True,
 				max_temperature=2.0,
 			),
 			ProviderAIModel(
 				id="gpt-4-turbo",
+				name="GPT 4 Turbo",
 				# Translators: This is a model description
 				description=_(
 					"The latest GPT-4 Turbo model with vision capabilities"
@@ -176,6 +198,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-3.5-turbo",
+				name="GPT 3.5 Turbo",
 				# Translators: This is a model description
 				description=_(
 					"Points to one of the most recent iterations of gpt-3.5 model"
@@ -185,6 +208,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4o-2024-08-06",
+				name="GPT 4o (2024-08-06)",
 				# Translators: This is a model description
 				description=_(
 					"Latest snapshot that supports Structured Outputs"
@@ -196,6 +220,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4o-2024-05-13",
+				name="GPT 4o (2024-05-13)",
 				# Translators: This is a model description
 				description=_(
 					"Our high-intelligence flagship model for complex, multi-step tasks"
@@ -207,6 +232,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4o-mini-2024-07-18",
+				name="GPT 4o Mini (2024-07-18)",
 				# Translators: This is a model description
 				description=_(
 					"Our affordable and intelligent small model for fast, lightweight tasks. GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo"
@@ -218,6 +244,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-3.5-turbo-0125",
+				name="GPT 3.5 Turbo (0125)",
 				# Translators: This is a model description
 				description=_(
 					"The latest GPT-3.5 Turbo model with higher accuracy at responding in requested formats and a fix for a bug which caused a text encoding issue for non-English language function calls"
@@ -227,6 +254,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-turbo-preview",
+				name="GPT 4 Turbo Preview",
 				# Translators: This is a model description
 				description=_(
 					"Points to one of the most recent iterations of gpt-4 model"
@@ -237,6 +265,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-0125-preview",
+				name="GPT 4 (0125) Preview",
 				# Translators: This is a model description
 				description=_(
 					"The latest GPT-4 model intended to reduce cases of “laziness” where the model doesn’t complete a task"
@@ -247,6 +276,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-1106-preview",
+				name="GPT 4 (1106) Preview",
 				# Translators: This is a model description
 				description=_(
 					"GPT-4 Turbo model featuring improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more"
@@ -257,6 +287,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-vision-preview",
+				name="GPT 4 Vision Preview",
 				# Translators: This is a model description
 				description=_(
 					"GPT-4 Turbo with vision. Ability to understand images, in addition to all other GPT-4 Turbo capabilities"
@@ -268,6 +299,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-0613",
+				name="GPT 4 (0613)",
 				# Translators: This is a model description
 				description=_(
 					"More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat"
@@ -277,6 +309,7 @@ def models(self) -> list[ProviderAIModel]:
 			),
 			ProviderAIModel(
 				id="gpt-4-32k-0613",
+				name="GPT 4 (32k) (0613)",
 				# Translators: This is a model description
 				description=_(
 					"Same capabilities as the standard gpt-4 mode but with 4x the context length"


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 4**

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: ASSERTIVE**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 0978a4af9bd77c2d8da1643abcfd2dfcd83a0a6d and 586711a05b17b4e580deb2d14a54e01efe608e46.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `basilisk/provider_ai_model.py` (1 hunks)
* `basilisk/provider_engine/anthropic_engine.py` (5 hunks)
* `basilisk/provider_engine/deepseek_engine.py` (1 hunks)
* `basilisk/provider_engine/openai_engine.py` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: build_app / build_windows (x64)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>basilisk/provider_engine/deepseek_engine.py (1)</summary>

`66-66`: **Confirm that `reasoning=True` aligns with intended usage.**

Enabling reasoning for all calls may have performance or cost implications. Ensure this default setting is correct for every scenario.

</details>
<details>
<summary>basilisk/provider_engine/openai_engine.py (1)</summary>

`102-112`: **New model definition looks good.**

This addition appropriately expands the available models with creative and planning capabilities. No issues found.

</details>
<details>
<summary>basilisk/provider_engine/anthropic_engine.py (4)</summary>

`93-103`: **Model ID suffix naming convention.**

You’re including “_reasoning” in the model ID, but later (line 298) removing it before calling the API. Ensure this suffix is strictly used for internal indication and doesn’t create confusion in logs or references.

---

`104-111`: **New “Claude 3.7 Sonnet” model looks fine.**

The addition is consistent with the existing models. No issues detected.

---

`296-303`: **Re-check removing `top_p` in reasoning mode.**

Disabling `top_p` when reasoning is enabled may be intentional. Confirm this is the proper approach, or consider if users might want to tweak both settings simultaneously.

---

`362-375`: **Validate “thinking” code block closure logic.**

You're toggling code block boundaries based on `thinking_content_started` and event type. Thoroughly test cases where multiple “thinking_delta” events occur to ensure the code fence never remains open or incorrectly closes.



Also applies to: 379-394

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-02T00:54:05Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>♻️ Duplicate comments (2)</summary><blockquote>

<details>
<summary>basilisk/provider_engine/anthropic_engine.py (2)</summary><blockquote>

`295-301`: _🧹 Nitpick (assertive)_

**Consider chain-of-thought exposure & avoid “_reasoning” suffix string replacement.**

1. Enabling “thinking” can inadvertently expose internal chain-of-thought content. This risk was noted in a previous review.  
2. Relying on “.replace('_reasoning', '')” to get the final model name is also error-prone. A dedicated canonical name or ID field could prevent future inconsistencies.




```diff
-    params["model"] = model.id.replace("_reasoning", "")
+    # For example:
+    params["model"] = getattr(model, "anthropic_id", model.id)
```

---

`340-358`: _🧹 Nitpick (assertive)_

**Remove extra space and revisit chain-of-thought exposure.**

1. There’s an extra space after the newline in the “```think” block, potentially causing unintended formatting.  
2. The thinking output may expose internal reasoning. This risk has been raised in a previous comment.




```diff
-            content = f"```think\n {event.delta.thinking}"
+            content = f"```think\n{event.delta.thinking}"
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: ASSERTIVE**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d24c0417de6a08a94089c4599074005ba5965566 and 26de9d8e6772c6b295e7da929b3c7e8c38f54d20.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `basilisk/provider_ai_model.py` (2 hunks)
* `basilisk/provider_engine/anthropic_engine.py` (4 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: build_app / build_windows (x64)

</details>

<details>
<summary>🔇 Additional comments (11)</summary><blockquote>

<details>
<summary>basilisk/provider_engine/anthropic_engine.py (11)</summary>

`365-368`: **No issues found.**

Logic for handling the stream parameter is straightforward and consistent; no changes needed.

---

`370-371`: **No issues found.**

Initialization of local flags appears correct.

---

`374-375`: **No issues found.**

Capturing the content block start event is straightforward.

---

`377-382`: **No issues found.**

Properly closing the “thinking” code block when the block stops.

---

`387-393`: **Potential chain-of-thought exposure.**

You’re emitting “thinking_delta” content. As flagged before, ensure you truly want to expose internal chain-of-thought data to end-users.

---

`399-403`: **No issues found.**

The “message_stop” case correctly yields a closing code block (if thinking is active) before ending the stream.

---

`421-421`: **No issues found.**

Initializing the thinking content to None is clear and safe.

---

`422-423`: **No issues found.**

Conditional assignment logic for the “thinking” attribute is sound.

---

`429-429`: **No issues found.**

String join approach for message content is concise.

---

`430-433`: **Potential chain-of-thought exposure.**

Prepending the full thinking content to the user-facing output may risk leaking internal reasoning, as previously noted.

---

`436-436`: **No issues found.**

Assigning the final content to the message is correct.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-02T13:22:40Z

Review comments:
diff_hunk: @@ -32,6 +32,7 @@ class ProviderAIModel:
 	max_temperature: float = field(default=1.0)
 	default_temperature: float = field(default=1.0)
 	vision: bool = field(default=False)
+	reasoning: bool = field(default=False)
path: basilisk/provider_ai_model.py
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Document the new `reasoning` attribute.**

This new boolean field expands the model’s configuration but is not mentioned in the class docstring. For clarity, please add a brief explanation of its purpose to the class docstring.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T00:54:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -311,28 +338,62 @@ def _handle_citation(self, citation: dict) -> dict:
 				log.warning(f"Unsupported citation type: {citation.type}")
 		return citation_chunk_data
 
+	def _handle_thinking(
+		self, started: bool, event: MessageStreamEvent
+	) -> tuple[str, bool]:
+		if not started:
+			started = True
+			conten = "```think\n" + event.delta.thinking
+			return conten, started
+		else:
+			return event.delta.thinking, started
+
path: basilisk/provider_engine/anthropic_engine.py
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix typo in local variable name.**

The variable `conten` contains a misspelling and can impact readability. Rename to something like `content_str`.

```diff
- conten = "```think\n" + event.delta.thinking
+ content_str = "```think\n" + event.delta.thinking
```

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T00:54:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -349,14 +410,22 @@ def completion_response_without_stream(
 		"""
 		citations = []
 		text = []
+		thinking_content = None
+		if hasattr(response, "thinking") and response.thinking:
+			thinking_content = response.thinking
 		for content in response.content:
 			if content.citations:
 				for citation in content.citations:
 					citations.append(self._handle_citation(citation))
 			text.append(content.text)
+		final_content = ''.join(text)
+		if thinking_content:
+			final_content = (
+				f"```think\n{thinking_content}\n```\n\n{final_content}"
+			)
path: basilisk/provider_engine/anthropic_engine.py
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Be aware of potential information leakage.**

Including the entire `thinking_content` in the final response may inadvertently expose internal chain-of-thought. If this is not desired, consider limiting or anonymizing this content before returning it to users.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T00:54:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -202,6 +221,7 @@ def convert_message(self, message: Message) -> dict:
 		Returns:
 			Message in Anthropic API format with role and content.
 		"""
+		print(type(Source))
path: basilisk/provider_engine/anthropic_engine.py
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Remove debug print statement.**

Use a logger if you need to inspect the type of `Source` rather than a direct `print`, to maintain clean logs and consistent debugging practices.

```diff
- print(type(Source))
+ log.debug(f"Source type: {type(Source)}")
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
		log.debug(f"Source type: {type(Source)}")
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T00:54:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -20,6 +20,7 @@ class ProviderAIModel:
 		max_output_tokens: The maximum number of output tokens for the AI model.
 		max_temperature: The maximum temperature for the AI model.
 		default_temperature: The default temperature for the AI model.
+		rationing: Whether the AI model supports reasoning.
path: basilisk/provider_ai_model.py
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix docstring to match the new `reasoning` attribute.**

There is a mismatch between the docstring and the actual field name: the docstring refers to "rationing" while the code uses "reasoning." This can lead to confusion for anyone referencing the docstring.



```diff
-		rationing: Whether the AI model supports reasoning.
+		reasoning: Whether the AI model supports reasoning.
```


Also applies to: 36-36

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:22:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -90,6 +90,25 @@ def models(self) -> list[ProviderAIModel]:
 		log.debug("Getting Anthropic models")
 		# See <https://docs.anthropic.com/en/docs/about-claude/models>
 		return [
+			ProviderAIModel(
+				id="claude-3-7-sonnet-latest_reasoning",
+				name="Claude 3.7 Sonnet (thinking)",
+				# Translators: This is a model description
+				description=_("Our most intelligent model"),
+				context_window=200000,
+				max_output_tokens=64000,
+				vision=True,
+				reasoning=True,
+			),
path: basilisk/provider_engine/anthropic_engine.py
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Avoid relying on the “_reasoning” suffix in the model ID.**

Defining the model’s ID with a “_reasoning” suffix and then stripping it out later can be fragile, especially if the naming convention changes or additional suffixes are introduced. Consider storing a separate property or using a more robust approach to mark a model as “reasoning-capable.”



```diff
-    id="claude-3-7-sonnet-latest_reasoning",
+    id="claude-3-7-sonnet-latest",
+    # Or introduce a separate field, for example:
+    anthropic_id="claude-3-7-sonnet-latest",
     reasoning=True,
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
			ProviderAIModel(
				id="claude-3-7-sonnet-latest",
				# Or introduce a separate field, for example:
				anthropic_id="claude-3-7-sonnet-latest",
				name="Claude 3.7 Sonnet (thinking)",
				# Translators: This is a model description
				description=_("Our most intelligent model"),
				context_window=200000,
				max_output_tokens=64000,
				vision=True,
				reasoning=True,
			),
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:22:39Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-03-02T00:54:01Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough
This pull request introduces reasoning capabilities across multiple AI model providers. A new boolean attribute `reasoning` (defaulting to `False`) is added to the `ProviderAIModel`. The `AnthropicEngine` incorporates this reasoning flag, leading to modifications in the completion flow, including conditional parameter adjustments, a new `thinking` parameter, and a helper method (`_handle_thinking`) for processing stream events related to thinking content. Additionally, the `DeepSeekAIEngine` instantiates its model with reasoning enabled, while the `OpenAIEngine` adds a new model with extended attributes that include reasoning-related configurations.

## Changes

| File(s)                                                      | Change Summary |
| ------------------------------------------------------------ | -------------- |
| `basilisk/provider_ai_model.py`                              | Added `reasoning: bool = field(default=False)` to `ProviderAIModel`. |
| `basilisk/provider_engine/anthropic_engine.py`               | Added two new `ProviderAIModel` instances with reasoning attributes; introduced a new `_handle_thinking` method; updated `completion`, `completion_response_with_stream`, and `completion_response_without_stream` methods to adjust parameters and process thinking events. |
| `basilisk/provider_engine/deepseek_engine.py`                | Instantiated a model with `reasoning=True` in `DeepSeekAIEngine`. |
| `basilisk/provider_engine/openai_engine.py`                  | Added a new model `gpt-4.5-preview` with extended attributes including reasoning-related configuration; updated existing models to include `name` attributes. |

## Sequence Diagram(s)
```mermaid
sequenceDiagram
    participant C as Client
    participant AE as AnthropicEngine
    participant MS as Message Stream

    C->>AE: Call completion(request)
    AE->>AE: Check if model.reasoning is enabled
    alt Reasoning Enabled
        AE->>AE: Remove 'top_p' and adjust model name
        AE->>AE: Initiate _handle_thinking() for thinking content
    end
    AE->>MS: Process stream events (content_block_start, thinking_delta, content_block_stop)
    MS-->>AE: Return event data
    AE->>C: Yield combined text and thinking output
```

## Possibly related PRs
- **SigmaNight/basiliskLLM#128**: Related changes in `ProviderAIModel` instances in `OpenAIEngine` regarding reasoning capabilities.
- **SigmaNight/basiliskLLM#192**: Modifications in `OpenAIEngine` that incorporate reasoning capabilities in model configurations.
- **SigmaNight/basiliskLLM#166**: Directly related changes in `AnthropicEngine` incorporating the `reasoning` attribute for new model instances.

## Suggested reviewers
- AAClause

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: ASSERTIVE**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 26de9d8e6772c6b295e7da929b3c7e8c38f54d20 and 29d04a6c86a1d46da4b8aef61eb69a6eff17dcc4.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `basilisk/provider_ai_model.py` (2 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: build_app / build_windows (x64)

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>basilisk/provider_ai_model.py (2)</summary>

`23-23`: **Good addition to the class docstring!**

The docstring now properly documents the new `reasoning` attribute.

---

`36-36`: **Well implemented attribute.**

The new `reasoning` attribute correctly follows the class's field pattern with a default value of `False`.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AzEtQAUzRSQsBKdLXrMkieBiJIZyULZEx6f1wKRWwGf0CKe0R8DHiDADlsZgFKLgBWADYAdgMAVURcyABrEgl/JWi2I31jcCgyenwbHAJiMmUaeiZWdi5efmFRcSkZeSYGlTVNbV0wQxMoOFRUTB7CUnIqQYURjE5IKgB3SEQs5jQKeTkFBdV1LR0W1tMDATQ/CxIKoAel4+DqDQA+tpIcFXBpuLIOAYAERogwAYgxkAAggBJPqHah0G53B7yLqMWCYUiIIw4yDka4CfD4Ky7ahReACPAkSAAA0S/xS8X5kGpMhIZE8SnoBEguFgfP5AAVohDKPiALIuCxihgWf6IDQwBBhXBcnk0FDIfzqeBoQEALxJl3UsHQkCUNjQ2AsuEgEkd2D5lP5AD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

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: AAClause
created_at: 2025-03-03T07:59:26Z
body: Thanks @kevinderome, and welcome to the team, dear friend! 😊
author_association: MEMBER