ai icon indicating copy to clipboard operation
ai copied to clipboard

experimental_decide: return sources from web-grounded decision models

Open robelest opened this issue 1 week ago • 1 comments

Decision models that search the web return the sources behind their answers. OpenRouter's /api/alpha/decisions returns a top-level annotations array of url_citation objects for the request as a whole, not per answer (https://openrouter.ai/docs/api/api-reference/alphadecisions/submit-a-decisions-request.md). DecisionModelV4Result and DecisionResult have no field for them, so each provider has to put them under its own providerMetadata key and apps can't read them portably. Proposal: add sources?: LanguageModelV4Source[] (url sources) to DecisionModelV4Result, and sources to DecisionResult and DecideEndEvent, matching generateText's sources.

robelest avatar Nov 26 '26 22:11 robelest

Identify issue type

Identified as Feature
Confidence: High

Rationale

The issue requests an API expansion to expose web-grounding sources, not a fix for behavior that violates an existing contract.

Evidence

  • Requests adding sources fields to DecisionModelV4Result, DecisionResult, and DecideEndEvent.
  • Current citations require provider-specific providerMetadata; the proposal would expose them portably, matching generateText.

ai-sdk-factory[bot] avatar Nov 26 '26 22:11 ai-sdk-factory[bot]