Skip to content

feat: support the DeepSeek official endpoint - #42

Open
minixalpha wants to merge 3 commits into
mainfrom
feat/deepseek-official-support
Open

minixalpha wants to merge 3 commits into
mainfrom
feat/deepseek-official-support

Conversation

@minixalpha

Copy link
Copy Markdown
Owner

Summary

Switches the benchmark path to DeepSeek's official Anthropic-compatible endpoint and adds the two pieces it needs: a token-based cost estimator (DeepSeek reports no per-request cost) and a setup retry for transient package-index 404s. Records the resulting pilot20.

  • feat(cost): add estimated_cost(model, usage) with a static DeepSeek price list. Used only after usage_cost() fails, marked kind: estimated.
  • fix(harbor): retry the agent's system-dependency apt-get transaction a bounded number of times on a transient HTTP 404.
  • docs(benchmarks): add the structured result and report for the DeepSeek official pilot20, plus changelog entries.

Result

20-task pilot set, deepseek-flash, endpoint https://api.deepseek.com/anthropic, max_turns 100, max_tokens 65536, concurrency 2.

Bucket Count
Scored trials 18
Passed 16
Reward 0 2
Infrastructure exceptions 2

Reward 0: torch-tensor-parallelism, pytorch-model-recovery. Exceptions: qemu-alpine-ssh (apt 404 during setup, no model call) and torch-pipeline-parallelism (verifier timeout).

Token-estimated cost: $1.356802 (input 0.3, cache read 0.006, output 1.2 USD per million).

Notes

  • DeepSeek's official API exposes no cost, generation id, or usage/billing endpoint, so the estimator is the only per-task accounting path.
  • The qemu retry fired on attempts 1/3 and 2/3 but still failed: the pinned bullseye-security index references removed .deb versions, so the 404 is deterministic. The historical fix preloads a verified .deb cache; that remains a follow-up.

Validation

  • uv run pytest — 333 passed, 4 skipped
  • uv run --project benchmarks/harbor pytest -c benchmarks/harbor/pyproject.toml benchmarks/harbor/tests — 28 passed

DeepSeek's official Anthropic-compatible endpoint returns token usage but
no per-request cost, no generation id, and no usage or billing endpoint,
so the existing OpenRouter usage/generation reconciliation cannot resolve
a cost. Add estimated_cost(), which prices the returned input, output, and
cache token counts with a static DeepSeek price list. It is used only
after usage_cost() fails, so a provider-reported cost always wins, and it
is marked kind: estimated to stay distinct from a reported or reconciled
cost.
Pinned task images occasionally resolve a package index that still points
at removed .deb versions, so apt-get install fails with a 404 during
agent setup before any model call. Retry the system-dependency
transaction a bounded number of times; non-404 failures and the final
attempt still propagate.
Add the structured result and report for running the 20-task pilot set on
the DeepSeek official endpoint with deepseek-flash (16/18 scored, two
infrastructure exceptions, token-estimated cost), plus the changelog
entries for the cost estimator and the setup retry.
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