Send per-app provider attribution titles from one gateway app registry
Add openai_gateway/apps.py as the single list of internal gateway apps and send X-OpenRouter-Title (plus legacy X-Title and HTTP-Referer) per app to every upstream. Label the Devii agent, bots, modifier, quiz grading, SEO metadata, community and sync callers. Shorten two app references that exceeded the 30 character limit and were recorded as default. Also includes the pending Muse Code, route health and Responses work. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ from typing import Any, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from devplacepy.services.openai_gateway.apps import LEGACY_TITLE_HEADER, TITLE_HEADER
|
||||
from devplacepy.services.openai_gateway.config import VISION_INSTRUCTION
|
||||
from devplacepy.services.openai_gateway.reliability import (
|
||||
_backoff,
|
||||
@@ -178,7 +179,8 @@ class VisionAugmenter:
|
||||
if self.referer:
|
||||
headers["HTTP-Referer"] = self.referer
|
||||
if self.title:
|
||||
headers["X-Title"] = self.title
|
||||
headers[TITLE_HEADER] = self.title
|
||||
headers[LEGACY_TITLE_HEADER] = self.title
|
||||
start = time.monotonic()
|
||||
attempt = 0
|
||||
resp: Optional[httpx.Response] = None
|
||||
|
||||
Reference in New Issue
Block a user