refactor: integrate Nous Portal support in auxiliary client

- Added functionality to include product attribution tags for Nous Portal in auxiliary API calls.
- Introduced a mechanism to determine if the auxiliary client is backed by Nous Portal, affecting the extra body of requests.
- Updated various tools to utilize the new extra body configuration for enhanced tracking in API calls.
This commit is contained in:
teknium1
2026-02-25 18:39:36 -08:00
parent e3cb957a10
commit 7a3656aea2
5 changed files with 40 additions and 1 deletions

View File

@@ -314,11 +314,14 @@ async def vision_analyze_tool(
logger.info("Processing image with %s...", model)
# Call the vision API
from agent.auxiliary_client import get_auxiliary_extra_body
_extra = get_auxiliary_extra_body()
response = await _aux_async_client.chat.completions.create(
model=model,
messages=messages,
temperature=0.1,
max_tokens=2000,
**({} if not _extra else {"extra_body": _extra}),
)
# Extract the analysis