Skip to main content

Module hosted_hint

Module hosted_hint 

Source
Expand description

Hint-emission helpers shared by hosted-provider clients (openai, openrouter, azure-openai). Hint-emission helpers shared by the hosted AI provider clients.

When a hosted provider (openai, openrouter, azure-openai) fails in a pattern that strongly suggests the user actually meant to call an OpenAI-compatible local / LAN endpoint, the hosted client appends the canonical advisory string from crate::services::ai::security::local_provider_hint to the resulting crate::error::SubXError::AiService message.

This module centralises the predicates and the appender so every hosted client emits the hint identically.