Skip to content

Conversation

@subtleGradient
Copy link
Member

No description provided.

Three experiments to diagnose PDF input failures via OpenRouter:

- pdf-vs-image: proves image_url format fails for PDFs, file+plugin works
- pdf-message-shape-matrix: tests shape (file-only vs text+file) × format
- pdf-direct-input: compares PDF support across OpenAI/Anthropic/Google

Key finding: 'file' content type with file-parser plugin is the universal
format. AI SDK's image_url approach fails for OpenAI PDFs.
- Add shared request-cache utility that caches API responses to disk
- Update fetch/pdf-direct-input to use caching
- Add ai-sdk-v5/pdf-openai-regression tests with caching
- Cache avoids hitting OpenRouter API repeatedly during development
If response body parses as JSON, store as body.json object.
Otherwise store as body.text string. Makes cache files readable.
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​openrouter/​ai-sdk-provider@​1.5.3 ⏵ 1.5.499 +110010099 +1100

View full report

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.

2 participants