b4fbd6fe9f
Deploy Site / deploy-vercel (push) Has been skipped
Deploy Site / deploy-docs (push) Has been skipped
Build Skills Index / build-index (push) Has been skipped
CI / Deny unrelated histories (push) Has been skipped
CI / Detect affected areas (push) Successful in 27m35s
CI / OSV scan (push) Failing after 4s
CI / Build&Test Docker image (push) Successful in 9s
CI / Supply-chain scan (push) Has been skipped
CI / Lint Docker scripts (push) Failing after 5m13s
CI / Check contributors (push) Failing after 12m8s
CI / Docs Site (push) Failing after 12m8s
CI / TypeScript (push) Failing after 12m8s
CI / Python lints (push) Failing after 12m9s
CI / Python tests (push) Failing after 12m9s
CI / Check uv.lock (push) Failing after 23m22s
CI / CI timing report (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
CI / All required checks pass (push) Has been cancelled
59 lines
1.8 KiB
Python
59 lines
1.8 KiB
Python
"""Nous Portal provider profile."""
|
|
|
|
from typing import Any
|
|
|
|
from agent.portal_tags import nous_portal_tags
|
|
from providers import register_provider
|
|
from providers.base import ProviderProfile
|
|
|
|
|
|
class NousProfile(ProviderProfile):
|
|
"""Nous Portal — product tags, reasoning with Nous-specific omission."""
|
|
|
|
def build_extra_body(
|
|
self, *, session_id: str | None = None, **context
|
|
) -> dict[str, Any]:
|
|
body: dict[str, Any] = {"tags": nous_portal_tags()}
|
|
provider_preferences = context.get("provider_preferences")
|
|
if provider_preferences:
|
|
body["provider"] = provider_preferences
|
|
return body
|
|
|
|
def build_api_kwargs_extras(
|
|
self,
|
|
*,
|
|
reasoning_config: dict | None = None,
|
|
supports_reasoning: bool = False,
|
|
**context,
|
|
) -> tuple[dict[str, Any], dict[str, Any]]:
|
|
"""Nous: passes full reasoning_config, but OMITS when disabled."""
|
|
extra_body = {}
|
|
if supports_reasoning:
|
|
if reasoning_config is not None:
|
|
rc = dict(reasoning_config)
|
|
if rc.get("enabled") is False:
|
|
pass # Nous omits reasoning when disabled
|
|
else:
|
|
extra_body["reasoning"] = rc
|
|
else:
|
|
extra_body["reasoning"] = {"enabled": True, "effort": "medium"}
|
|
return extra_body, {}
|
|
|
|
|
|
nous = NousProfile(
|
|
name="nous",
|
|
aliases=("nous-portal", "nousresearch"),
|
|
env_vars=("NOUS_API_KEY",),
|
|
display_name="Nous Research",
|
|
description="Nous Research — Hermes model family",
|
|
signup_url="https://nousresearch.com/",
|
|
fallback_models=(
|
|
"hermes-3-405b",
|
|
"hermes-3-70b",
|
|
),
|
|
base_url="https://inference.nousresearch.com/v1",
|
|
auth_type="oauth_device_code",
|
|
)
|
|
|
|
register_provider(nous)
|