orchestrata_ultimate.verification.models.qwen_max

Reference › orchestrata_ultimate › verification › models › qwen_max

QwenMaxModel wraps Qwen Max, described as suited to multilingual verification and large context (Spec 035 US-005). It implements the LLMModel protocol from base_model under the name qwen-max, with a base URL defaulting to the DashScope host, and declares only multilingual as a capability. As written, its methods return fixed dictionaries and make no network request; generate_proof returns the proof type practical_explanation. No module imports it inside the package.

At a glance

Source src/orchestrata_ultimate/verification/models/qwen_max.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

Class diagram orchestrata_ultimate.verification.models.qwen_max

Dependency diagram

Dependency diagram orchestrata_ultimate.verification.models.qwen_max

API

Classes

QwenMaxModel

Decorators: traces(spec='035', story='US-005', reqs=['REQ-035-US-005-003', 'REQ-035-US-005-013', 'REQ-035-US-005-021']) · Line 18

Qwen Max — multilingual verification, large context.

Method Signature Summary
__init__ __init__(api_key: str = '', base_url: str = 'https://dashscope.aliyuncs.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

Permalink: https://gitlab.com/MSamy/orchestrata-ultimate-architecture/-/blob/a4cbc2bdf/src/orchestrata_ultimate/verification/models/qwen_max.py

"""Qwen Max 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-003", "REQ-035-US-005-013", "REQ-035-US-005-021"],
)
class QwenMaxModel:
    """Qwen Max — multilingual verification, large context."""

    def __init__(
        self, api_key: str = "", base_url: str = "https://dashscope.aliyuncs.com"
    ) -> None:
        self._api_key = api_key
        self._base_url = base_url

    @property
    @traces(
        spec="035", story="US-005", reqs=["REQ-035-US-005-003", "REQ-035-US-005-013"]
    )
    def name(self) -> str:
        return "qwen-max"

    @property
    @traces(
        spec="035", story="US-005", reqs=["REQ-035-US-005-003", "REQ-035-US-005-013"]
    )
    def capabilities(self) -> dict[str, bool]:
        return {
            "reasoning": False,
            "formal_verification": False,
            "multilingual": True,
            "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-003", "REQ-035-US-005-013"]
    )
    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-003", "REQ-035-US-005-013"]
    )
    async def generate_proof(
        self, constraint: dict[str, Any], context: dict[str, Any]
    ) -> dict[str, Any]:
        return {
            "model": self.name,
            "proof_type": "practical_explanation",
            "constraint_id": constraint.get("id", ""),
        }