Skip to content

Added a User-Agent naming the assistant for self-hosted providers - #1020

Open
donework wants to merge 1 commit into
MindWorkAI:mainfrom
donework:feature/user-agent-with-assistant
Open

donework wants to merge 1 commit into
MindWorkAI:mainfrom
donework:feature/user-agent-with-assistant

Conversation

@donework

@donework donework commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

AI Studio now sends a User-Agent header to LLM providers. This lets gateways such as LiteLLM tell AI Studio requests apart from other clients. LiteLLM shows the header as tags in its logs.

  • All providers receive the app name, version, and platform:
    MindWorkAIStudio/26.9.1 (osx-arm64)
  • Self-hosted providers also receive the component that sent the chat request:
    … Component/CHAT or … Component/TRANSLATION_ASSISTANT
  • Assistant plugins are also named. The name is reduced to ASCII for the header, e.g. "Café Menu Writer (Beta)" becomes:
    … Component/DYNAMIC_ASSISTANT Assistant/Cafe-Menu-Writer-Beta

The assistant name only goes to self-hosted providers. Cloud providers such as OpenAI, Anthropic, or Google only receive the generic User-Agent.

Agents such as data source selection or retrieval context validation keep running as CHAT, so their requests show up as Component/CHAT.

Test checklist

  • dotnet test in app/Tests passes, including the new AppUserAgentTests
  • Chat via a self-hosted provider (e.g. LiteLLM) shows User-Agent: MindWorkAIStudio/… Component/CHAT in the tags
  • A built-in assistant (e.g. Translation) shows Component/TRANSLATION_ASSISTANT
  • An assistant plugin shows Component/DYNAMIC_ASSISTANT Assistant/<plugin name>, with umlauts and special characters cleaned up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant