literaf/dsh-ai4scholar2

dsh-ai4scholar

AI4Scholar for DeepSeek Harness (dsh): 38 native academic tools — Semantic Scholar, PubMed, Google Scholar, arXiv, bioRxiv/medRxiv, DOI resolution, PDF full text, auto-cite, scientific figures, credit balance — with an API-key card in the Web UI settings. Powered by ai4scholar.net.

包名
dsh-ai4scholar
版本
0.3.1
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:literaf/dsh-ai4scholar

Configuration

The bundle mounts one row (id: ai4scholar) with these defaults. Override from your profile's cordis.patch.yml (a patch replaces the whole config, so restate every key you keep):

- id: ai4scholar
  config:
    apiKeyEnv: AI4SCHOLAR_API_KEY   # credential reference; the key itself never lives in config
    baseUrl: https://ai4scholar.net
    # tool families
    semanticScholar: true
    pubmed: true
    googleScholar: true
    arxiv: true
    biorxiv: true                    # bioRxiv + medRxiv
    doi: true
    fullText: true                   # the read_* tools (PDF download + text extraction)
    autoCite: true
    sciDraw: true
    creditsTool: true                # get_ai4scholar_credits
    command: true                    # the /ai4scholar slash command
    balanceRoute: true               # GET /ai4scholar/balance for the settings card's key test
    showCredits: true                # credit line on billed results
    promptGuidance: true             # short system-prompt section describing the tools
    promptOrder: 150
    # sizes
    defaultMaxResults: 10            # when the model omits max_results
    maxResultsCap: 50                # hard upper bound per call
    abstractMaxChars: 600            # abstract characters shown per paper; 0 hides abstracts
    readMaxChars: 60000              # characters per full-text slice
    # timeouts / retry
    requestTimeoutMs: 30000          # per HTTP attempt
    pdfTimeoutMs: 120000             # per PDF download
    generationTimeoutMs: 300000      # auto_cite / sci_draw
    maxRetries: 3                    # attempts on 429 / network errors
    retryBackoffMs: 2000             # doubles per attempt
    toolTimeoutMs: 180000            # cooperative per-call budget enforced by dsh

The API key is resolved per call through ctx.credentials, so storing or rotating it takes effect on the next tool call without a restart. When the credentials service is absent (a custom composition), the plugin falls back to process.env[apiKeyEnv].

The settings card always edits AI4SCHOLAR_API_KEY (the browser half does not receive the row config); a deployment that overrides apiKeyEnv manages that reference through the environment or the credentials file instead. The session credit tally is process-local (it restarts with dsh); the balance itself always comes from the API.