Previous refactor (89f01ad) moved to OpenRouter because no sk-ant-api-* key
was found in Vault. Turns out claude-agent-service-spare-{1,2} hold
sk-ant-oat01-* OAuth tokens (108 chars, scope user:inference, 1-year TTL,
minted via 'claude setup-token' — see memory id=832).
These tokens work with the Anthropic SDK via the auth_token= constructor
argument (routes to Authorization: Bearer ... instead of x-api-key: ...).
They consume the Enterprise Claude subscription quota rather than
per-call billing, so the OpenRouter zero-credit problem goes away.
- llm_analyzer.py: revert OpenAI client to AsyncAnthropic; tool-use API
+ cache_control restored
- config.py: openrouter_api_key -> anthropic_oauth_token; model slug
reverted from anthropic/claude-sonnet-4.5 -> claude-sonnet-4-5
- main.py: AsyncOpenAI -> AsyncAnthropic(auth_token=...), drop OpenRouter
attribution headers
- pyproject: openai>=1.50 -> anthropic>=0.40 in meet_kevin extras
- tests: mocks ported back to messages.create + tool_use blocks
31 lines
998 B
Python
31 lines
998 B
Python
"""Configuration for the Meet Kevin watcher service."""
|
|
|
|
from shared.config import BaseConfig
|
|
|
|
|
|
class MeetKevinWatcherConfig(BaseConfig):
|
|
"""Meet Kevin watcher settings.
|
|
|
|
Extends :class:`BaseConfig` with YouTube channel monitoring,
|
|
caption fetching, and LLM analysis settings. All settings can be
|
|
overridden via environment variables prefixed with ``TRADING_``.
|
|
"""
|
|
|
|
# YouTube settings
|
|
meet_kevin_channel_id: str = "UCUvvj5lwue7PspotMDjk5UA"
|
|
meet_kevin_poll_interval_seconds: int = 10800
|
|
meet_kevin_max_caption_retries: int = 5
|
|
|
|
# LLM analysis settings
|
|
meet_kevin_max_llm_retries: int = 3
|
|
meet_kevin_llm_model: str = "claude-sonnet-4-5"
|
|
meet_kevin_prompt_version: str = "v1"
|
|
meet_kevin_daily_cost_cap_usd: float = 5.0
|
|
|
|
# API credentials
|
|
anthropic_oauth_token: str = ""
|
|
|
|
# Runtime settings
|
|
meet_kevin_workdir: str = "/tmp/meet_kevin_captions"
|
|
otel_service_name: str = "meet-kevin-watcher"
|
|
otel_metrics_port: int = 9097
|