orchestrata_ultimate.verification.models.deepseek_r1
Reference › orchestrata_ultimate › verification › models › deepseek_r1
DeepseekR1Model wraps Deepseek R1, described as suited to mathematical rigor and formal verification (Spec 035 US-005). It implements the LLMModel protocol from base_model under the name deepseek-r1, with a base URL defaulting to the Deepseek API host, and declares reasoning and formal verification as capabilities. As written, its methods return fixed dictionaries and make no network request; generate_proof returns the proof type mathematical. No module imports it inside the package.
At a glance
| Source | src/orchestrata_ultimate/verification/models/deepseek_r1.py |
| Lines of code | 73 |
| Classes | 1 |
| Functions | 0 |
| Imports (internal) | orchestrata_ultimate.core.base.traces |
| Imported by | none |
| Tests that import it | tests/verification/test_models.py, tests/verification/test_verification_models.py |
Class diagram
Dependency diagram
API
Classes
DeepseekR1Model
Decorators: traces(spec='035', story='US-005', reqs=['REQ-035-US-005-002', 'REQ-035-US-005-012', 'REQ-035-US-005-021']) · Line 18
Deepseek R1 — mathematical rigor, formal verification.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(api_key: str = '', base_url: str = 'https://api.deepseek.com') -> None |
|
name property |
name() -> str |
|
capabilities property |
capabilities() -> dict[str, bool] |
|
verify |
async verify(constraint: dict[str, Any], context: dict[str, Any]) -> dict[str, Any] |
|
analyze |
async analyze(results: list[dict[str, Any]]) -> dict[str, Any] |
|
generate_proof |
async generate_proof(constraint: dict[str, Any], context: dict[str, Any]) -> dict[str, Any] |
Source
"""Deepseek R1 model wrapper for verification."""
# Spec: 035 - Verification Agent
import logging
from typing import Any
from orchestrata_ultimate.core.base.traces import traces
logger = logging.getLogger(__name__)
@traces(
spec="035",
story="US-005",
reqs=["REQ-035-US-005-002", "REQ-035-US-005-012", "REQ-035-US-005-021"],
)
class DeepseekR1Model:
"""Deepseek R1 — mathematical rigor, formal verification."""
def __init__(
self, api_key: str = "", base_url: str = "https://api.deepseek.com"
) -> None:
self._api_key = api_key
self._base_url = base_url
@property
@traces(
spec="035", story="US-005", reqs=["REQ-035-US-005-002", "REQ-035-US-005-012"]
)
def name(self) -> str:
return "deepseek-r1"
@property
@traces(
spec="035", story="US-005", reqs=["REQ-035-US-005-002", "REQ-035-US-005-012"]
)
def capabilities(self) -> dict[str, bool]:
return {
"reasoning": True,
"formal_verification": True,
"multilingual": False,
"fast_iteration": False,
}
@traces(spec="035", story="US-005", reqs=["REQ-035-US-005-021"])
async def verify(
self, constraint: dict[str, Any], context: dict[str, Any]
) -> dict[str, Any]:
return {
"model": self.name,
"status": "verified",
"constraint_id": constraint.get("id", ""),
}
@traces(
spec="035", story="US-005", reqs=["REQ-035-US-005-002", "REQ-035-US-005-012"]
)
async def analyze(self, results: list[dict[str, Any]]) -> dict[str, Any]:
satisfied = sum(1 for r in results if r.get("status") == "satisfied")
return {"model": self.name, "total": len(results), "satisfied": satisfied}
@traces(
spec="035", story="US-005", reqs=["REQ-035-US-005-002", "REQ-035-US-005-012"]
)
async def generate_proof(
self, constraint: dict[str, Any], context: dict[str, Any]
) -> dict[str, Any]:
return {
"model": self.name,
"proof_type": "mathematical",
"constraint_id": constraint.get("id", ""),
}