HKUDS/nanobot · error · ValueError

Invalid thinking_style {v!r}. Must be one of: {', '.join(rep

Error message

Invalid thinking_style {v!r}. Must be one of: {', '.join(repr(s) for s in cls._VALID_THINKING_STYLES)} (or empty/omitted).

What it means

Error "Invalid thinking_style {v!r}. Must be one of: {', '.join(repr(s) for s in cls._VALID_THINKING_STYLES)} (or empty/omitted)." thrown in HKUDS/nanobot.

Source

Thrown at nanobot/config/schema.py:233

    proxy: str | None = None  # Explicit HTTP proxy; image downloads trust its DNS and egress
    thinking_style: str | None = None  # Thinking/reasoning style for custom providers

    # Valid values mirror the keys of _THINKING_STYLE_MAP in
    # nanobot/providers/openai_compat_provider.py. Kept duplicated here to
    # avoid an import cycle (schema.py must not import from providers/).
    _VALID_THINKING_STYLES: ClassVar[tuple[str, ...]] = (
        "thinking_type",
        "enable_thinking",
        "reasoning_split",
    )

    @field_validator("thinking_style")
    @classmethod
    def _validate_thinking_style(cls, v: str | None) -> str | None:
        if not v:  # None or "" -> no injection, valid (backwards compatible)
            return v
        if v not in cls._VALID_THINKING_STYLES:
            raise ValueError(
                f"Invalid thinking_style {v!r}. "
                f"Must be one of: {', '.join(repr(s) for s in cls._VALID_THINKING_STYLES)} "
                f"(or empty/omitted)."
            )
        return v


class BedrockProviderConfig(ProviderConfig):
    """AWS Bedrock Runtime provider configuration."""

    region: str | None = None  # AWS region, falls back to AWS_REGION/AWS_DEFAULT_REGION/profile
    profile: str | None = None  # Optional AWS shared config profile


class ProvidersConfig(Base):
    """Configuration for LLM providers.

    Supports custom providers via extra fields — any additional field

View on GitHub (pinned to 42f37dc4c0)

When it happens

Trigger: Thrown at nanobot/config/schema.py:233 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/f870c30eeff0c716. Report an issue: GitHub.