Skip to content

--since option does not filter dates for @ccusage/opencode #801

Description

@n2k3

The --since option appears to have no effect when used with @ccusage/opencode. The report includes all historical data regardless of the specified date.

Steps to reproduce
All of the following commands produce identical, unfiltered output:

bunx @ccusage/opencode@latest daily --since 20260107
bunx @ccusage/opencode@latest daily --since 20260107 --compact
bunx @ccusage/opencode@latest daily --since 2026-01-07
bunx @ccusage/opencode@latest daily --since 2026-01-07 --compact
bunx @ccusage/opencode@latest --since 20260107
bunx @ccusage/opencode@latest --since 20260107 --compact
bunx @ccusage/opencode@latest --since 2026-01-07
bunx @ccusage/opencode@latest --since 2026-01-07 --compact

Expected behavior

The daily report should only show entries from 2026-01-07 onward (inclusive).

Actual behavior

👉 click to show command log
paul@Mac virtoura % bunx @ccusage/opencode@latest daily --since 20260107 --compact

 WARN  Fetching latest model pricing from LiteLLM...

ℹ Loaded pricing for 2418 models

📊 OpenCode Token Usage Report - Daily

┌────────────┬─────────────────────────────────────────────────┬───────────┬────────────┬─────────────┐
│ Date       │ Models                                          │     Input │     Output │  Cost (USD) │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-26 │ - big-pickle                                    │    96,797 │     46,984 │       $3.65 │
│            │ - glm-4.7-free                                  │           │            │             │
│            │ - sonnet-4-5                                    │           │            │             │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-27 │ - sonnet-4-5                                    │        69 │     17,549 │       $1.10 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-28 │ - opus-4-5                                      │       251 │     34,367 │       $4.49 │
│            │ - sonnet-4-5                                    │           │            │             │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-29 │ - opus-4-5                                      │        15 │     44,857 │      $14.24 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-30 │ - opus-4-5                                      │        29 │     57,263 │      $13.79 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2025-12-31 │ - opus-4-5                                      │        82 │    189,846 │      $38.46 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-01 │ - opus-4-5                                      │        32 │     77,254 │      $14.33 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-02 │ - opus-4-5                                      │        37 │     95,399 │      $24.54 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-03 │ - opus-4-5                                      │        44 │     67,179 │      $18.51 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-04 │ - opus-4-5                                      │       303 │     56,931 │       $8.86 │
│            │ - sonnet-4-5                                    │           │            │             │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-05 │ - glm-4.7-free                                  │   277,725 │     44,404 │       $5.60 │
│            │ - grok-code                                     │           │            │             │
│            │ - opus-4-5                                      │           │            │             │
│            │ - sonnet-4-5                                    │           │            │             │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-07 │ - opus-4-5                                      │       122 │    295,759 │      $69.46 │
│            │ - sonnet-4-5                                    │           │            │             │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-09 │ - opus-4-5                                      │        76 │    151,391 │      $48.03 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-10 │ - opus-4-5                                      │       101 │    179,344 │      $57.50 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-11 │ - opus-4-5                                      │       143 │    223,622 │      $57.71 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ 2026-01-12 │ - opus-4-5                                      │        59 │     84,092 │      $29.51 │
├────────────┼─────────────────────────────────────────────────┼───────────┼────────────┼─────────────┤
│ Total      │                                                 │   375,885 │  1,666,241 │     $409.78 │
└────────────┴─────────────────────────────────────────────────┴───────────┴────────────┴─────────────┘

Additional context

  • Package: @ccusage/opencode@latest (run on January 12, 2026)
  • The same command without --since produces identical output.
  • Date filtering probably works as expected in the main ccusage CLI, suggesting this may be a missing feature or bug in the OpenCode variant.

Activity

  1. added 3 commits that reference this issue on Jan 31, 2026
    64a67f7
    40d53f6
    8b62e68
  2. ryoppippi commented on May 17, 2026

    @ryoppippi
    Member

    Closing during repository triage: this is covered by current main or later merged work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions