Skip to content

youcom solvers: prefer YDC_API_KEY env var (keep YOUCOM_API_KEY fallback)#29

Open
brainsparker wants to merge 1 commit into
allenai:mainfrom
brainsparker:ydc-api-key-env-var
Open

youcom solvers: prefer YDC_API_KEY env var (keep YOUCOM_API_KEY fallback)#29
brainsparker wants to merge 1 commit into
allenai:mainfrom
brainsparker:ydc-api-key-env-var

Conversation

@brainsparker

Copy link
Copy Markdown

What

Make the You.com solvers prefer the canonical YDC_API_KEY environment variable, keeping YOUCOM_API_KEY as a backward-compatible fallback.

Why

YDC_API_KEY is You.com's canonical API key env var — used by You.com's own docs/SDK and the LangChain/CrewAI/DSPy integrations. The solvers currently require YOUCOM_API_KEY, which is inconsistent with the rest of the ecosystem.

Change

In agent_baselines/solvers/youcom.py and agent_baselines/solvers/sqa/formatted_youcom.py:

YOUCOM_API_KEY = os.environ.get("YDC_API_KEY") or os.environ["YOUCOM_API_KEY"]

YDC_API_KEY is used when set; otherwise YOUCOM_API_KEY is honored exactly as before (and still raises if neither is present).

Part of a cross-ecosystem standardization effort: youdotcom-oss/integration-tracking#30

…ack)

YDC_API_KEY is You.com's canonical API key env var (used by You.com's own
docs/SDK and the LangChain/CrewAI/DSPy integrations). The You.com solvers
read YDC_API_KEY when set and fall back to YOUCOM_API_KEY otherwise, so
existing setups keep working.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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