User's Vault has openrouter_api_key but no direct sk-ant-* Anthropic key. OpenRouter passes through Claude Sonnet 4.6 (~3% markup over Anthropic list pricing) and matches the existing gpt_mini_endpoint pattern used by recruiter-responder. - Replace anthropic.AsyncAnthropic with openai.AsyncOpenAI + base_url - Convert Anthropic tool-use API to OpenAI function-calling - System prompt unchanged (analyst instructions are model-agnostic) - Drop cache_control (not in OpenAI API); revisit later if cost matters - Model slug: anthropic/claude-sonnet-4.5 (OpenRouter's current Claude tier) - Pricing: $3.10/M input, $15.50/M output (OpenRouter pass-through) - Config field anthropic_api_key -> openrouter_api_key - pyproject extras: anthropic>=0.40 -> openai>=1.50 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
31 lines
1,005 B
Python
31 lines
1,005 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 = "anthropic/claude-sonnet-4.5"
|
|
meet_kevin_prompt_version: str = "v1"
|
|
meet_kevin_daily_cost_cap_usd: float = 5.0
|
|
|
|
# API credentials
|
|
openrouter_api_key: str = ""
|
|
|
|
# Runtime settings
|
|
meet_kevin_workdir: str = "/tmp/meet_kevin_captions"
|
|
otel_service_name: str = "meet-kevin-watcher"
|
|
otel_metrics_port: int = 9097
|