Repository navigation
feat: add DeepSeek cost estimates and reliable Harbor runs - #42
Merged
Merged
Conversation
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.
Preserve estimated-cost metadata in ATIF and Harbor aggregates, and allow generation billing reconciliation to replace token-based estimates. Add a recorded working-tree runner, SHA256-verified APT cache, and a pinned QEMU dependency preflight. Retry only verifier timeouts, up to three native attempts, while preserving logs and keeping setup errors separate from scores. Document the workflow in both languages and cover its contracts in CI. Validation: 345 core tests passed with 4 skipped; 74 Harbor tests passed. The full QEMU trial passed its official verifier on the first attempt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DeepSeek's official endpoint reports token usage without billed costs. Add token-based estimates, preserve their classification and subtotals in ATIF and Harbor, and allow generation billing lookups to replace estimates.
Standardize Harbor runs with recorded source snapshots and wheels, index-verified APT caching, revision-pinned QEMU dependency preflight, and install-only checks. Keep setup errors separate from scored failures. Retry only verifier timeouts, at most three times at the native per-attempt limit with the same agent output; preserve archived logs even when download filters are enabled. Reject unresolved QEMU revisions selected through local paths or datasets, and accept install-only mode in JSON configuration.
Include bilingual Harbor documentation, a pinned QEMU configuration, a DeepSeek pilot20 report, and Harbor workflow checks in CI.
Validation: