Skip to content

Integration Reference

github-actions[bot] edited this page Dec 3, 2026 · 11 revisions

GraphPaper 0.10.0 · Documentation source · Suggest an edit

Integration reference

This page describes the interfaces implemented in GraphPaper 0.10.0. User-facing setup is in Models and reasoning and Find sources. External endpoints, model IDs and capability vocabularies can change independently; consult the linked primary documentation and test a connection before a large job.

Writing providers

Route Implemented request style
OpenRouter Chat Completions at the configured API base; model discovery and optional reasoning fields
OpenAI-compatible Chat Completions; direct OpenAI hosts use max_completion_tokens, other compatible endpoints use max_tokens
Anthropic Direct /v1/messages, separate system prompt, model capabilities and supported effort/thinking fields
Codex Official app-server authentication/model discovery plus non-interactive runtime execution

Structured tasks request JSON and validate the relevant contract. Truncated or invalid output does not become a complete manuscript. Retry and request budgets are bounded. A timeout is not treated as proof that a request was unbilled.

Reasoning is selected by role. Provider default omits the override. Codex uses advertised supportedReasoningEfforts; extended levels are not guessed. Other routes preserve their native field names and report unsupported combinations instead of silently downgrading them.

Primary references: Codex authentication, app-server, configuration, OpenRouter reasoning, Anthropic effort.

JEV / TypeSafe

Route Endpoint Default alias
OpenRouter https://openrouter.ai/api/alpha/decisions ~typesafe/jev-latest
Direct TypeSafe https://api.typesafe.ai/v1/systemone jev-latest

Requests include model, state and typed questions, with bearer authorization. The application uses noul, score and choice judgments with explicit criteria. Parsing validates types, ranges and probability distributions. Confidence gates control optional actions; a model judgment is not measured scientific validity.

Auto prefers available OpenRouter credentials, then direct TypeSafe; it does not silently fail over after a rejected paid request. No connection means no fabricated JEV score. The application’s combined editorial score is not a calibration result.

The model/state/questions envelope is sized in UTF-8 bytes before sending. Candidate/question batching and compact style-graph context prevent the former oversized-state failure. Original question keys are retained when answers are combined; unscored optional decisions are distinct from API or typed-answer errors. Voice graphs and request sizing.

Primary references: OpenRouter JEV guide, TypeSafe quickstart, TypeSafe SDK constants.

Source discovery uses JEV to assess relevance, accessible evidence, perspective and a need for full text. It can select one bounded OpenAlex meaning-search follow-up when the original query and provider choices permit it. It does not generate bibliographic records or silently select sources. Research relevance excludes saved writing preferences. Direct search makes no model calls; only the separate query-planning action uses the configured extraction/writing model. Re-ranking and confidence routing describe the underlying patterns.

Scholarly adapters

Service Interface
OpenAlex /works keyword search and search.semantic, structured metadata, inverted-index abstracts and reported open copies
PubMed E-utilities search and record retrieval, including structured XML metadata
Semantic Scholar Academic Graph paper search with metadata, abstracts and available links
arXiv Atom query API
Crossref REST works discovery with provider-compatible lexical queries and optional date filters
Europe PMC REST search and available full-text XML

All six services are available in every project mode. OpenAlex public access works without a key; an optional free personal key provides a higher allowance. Optional NCBI and Semantic Scholar keys have their own service quotas and do not double as writing-model credentials. The vault exposes presence flags only. Provider availability and free allowances remain controlled by the services.

Queries, provider-specific transformations, limits, timestamps, cached reuse and partial failures are stored. Keyword runs can request up to 100 records per query per database; OpenAlex meaning search has a 2,000-character query and 50-record cap. A 15-minute exact-query cache reuses successful complete responses. Failed or incomplete responses are not cached as complete results. Date/access filters and deduplication are deterministic. An unknown access status does not count as confirmed open access.

Selected records become project sources without a download/upload round trip. Full-text fetching uses accessible URLs with the existing public-address validation or explicit uploaded-source attachment. Abstracts, metadata and user-supplied text retain separate access labels; a database's open-access flag is not proof that the app retrieved the complete paper.

Primary references: OpenAlex authentication, OpenAlex semantic search, NCBI, Semantic Scholar, arXiv, Crossref, Europe PMC.

Graphify

Native extraction remains independently available. External extraction runs the unmodified public graphifyy[openai]==0.9.125 CLI. The Windows package includes its dependencies, metadata, tokenizer cache and upstream licences; source environments use requirements-graphify.txt.

The worker receives only an isolated non-voice text corpus and a per-job loopback credential. It calls Graphify's OpenAI-compatible backend, but the authenticated local gateway routes inference through GraphPaper's selected extraction provider, model and reasoning setting. This includes official Codex OAuth, OpenRouter, API-compatible and Anthropic connections. No real provider/OAuth credential is passed to Graphify, and no API-key fallback is introduced.

Graphify requests share GraphPaper's budget and receipts. Extraction is serial; upstream retry layers are disabled to avoid multiplying requests. The total deadline and cancellation cover owned workers. A previously submitted cloud request can still consume allowance after cancellation. Invalid, missing, oversized, empty or dangling graph output does not replace the previous graph. No second Native extraction is run.

The output remains an external interpretation. Source-file IDs are retained as retrieval pointers, not truth labels; exact quotation anchors are checked separately. The native graph UI and angle discovery use the completed result.

God nodes is derived locally from the complete saved GraphPaper graph, whether Native, Graphify or imported. It adapts upstream degree ranking to writing by retaining concept nodes and counting distinct other neighbors. Parallel/reversed links count once; self-links, missing endpoints and isolates are excluded. It does not depend on upstream clustering files or make an inference request. The API and MCP results include node/source IDs and the project version. Navigation and ranking details.

A custom executable is an explicit trust choice and must match the supported upstream version. Its version check is not a full audit of that custom environment. Complete protocol, runtime and distribution guide

Primary references: public Graphify distribution, upstream source, Codex non-interactive execution.

Local API and desktop bridge

The local API is a session-protected implementation interface, not a public multi-tenant service. Routes cover projects, sources, graph operations, jobs, settings, prose proposals, scientific research and exports. Inspect server.py, studio_routes.py and science_routes.py for the base schemas; graph editing routes and voice library routes cover the current graph/voice extensions.

The bundled stdio MCP adapter exposes saved discovery through read_discovery, plan updates through configure_source_search, and inspected selected imports through add_research_sources. start_job supports the source-search, source-smart-search, source-plan, source-rank and source-fulltext actions. Mutations use the current project version; read-only mode exposes saved records without running searches. Agent interface.

The native bridge is intentionally narrow; its four methods are notify_ready, save_export, request_close and cancel_close. Do not attach public native/store objects to it. pywebview API provides the underlying desktop contract.

Clone this wiki locally