Skip to content

[DecimalError] Invalid argument: [object Object] #6010

Closed

Description

@karthiknish

Description

Keep getting this on opus 4.5

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Dec 23, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Dec 23, 2025

    @rekram1-node
    Collaborator

    what provider?

    Can you share a session?

    When does it happen?

    Steps to reproduce?

  3. gcacoutinho commented on Dec 24, 2025

    @gcacoutinho

    I'm getting the same thing.
    Just installed opencode on NixOS WSL via nix flakes configuration.
    Didn't set up anything else, just tried to run anything and it shows this error.
    On free models it shows the thinking process but doesn't execute anything.
    I would share the session here but it doesnt show the error there, just the commands I've issued

  4. karthiknish commented on Dec 24, 2025

    @karthiknish
    Author

    yes had the similar issue as above

  5. gcacoutinho commented on Dec 24, 2025

    @gcacoutinho

    Quick update, tried the same thing on Debian WSL and it worked just fine.
    Checked the version over on NixOS and it echoes 0.5.28 while Debian shows 1.0.198, apparently the NixOS version is quite old.
    Not sure if that's the case for everyone.

    edit: the weird thing is that I'm using unstable and my flakes are updated, maybe it has something to do with the WSL release? Not a big OS guy so I'm not sure that makes sense

    edit2: not exactly sure what I did, I was trying a bunch of stuff but nix flake update (again) fixed the version and I'm now on 1.0.180 on NixOS and it seems to be working just fine

  6. jakejrichards commented on Dec 24, 2025

    @jakejrichards

    +1 I'm seeing this as well. The error shows up as a final message / breaks chats randomly. It's very hard to debug, but I'm able to repro with (and I assume it's related to) the new @ai-sdk/anthropic major version (3.x.x) is installed, not seeing with 2.0.54.

  7. brandonwisnicki commented on Dec 25, 2025

    @brandonwisnicki
    Contributor

    Architecturally, seems like it would make sense to pin the provider package to a specific version rather than always relying on latest. Otherwise, opencode will be at the mercy of whatever changes are made upstream (in this case a breaking change in ai-sdk).

    A workaround right now is to change the provider.npm in the config to file://ABSOLUTE_PATH_TO_BUN_PROJECT/node_modules/@ai-sdk/anthropic where your bun project installs a pinned version rather than relying on the cache's latest version.

  8. Locbac commented on Dec 26, 2025

    @Locbac

    On nix-darwin with nixpkgs at 25.11 and nix-darwin at the same I'm also getting a very old version

    ❯ opencode -v
    0.3.58
    

    Opencode on nixpkgs unstable is at 1.0.180, the interesting thing is that I set it specifically to grab the latest package, but it still is using an old one anyways.
    I'm just adding a flake input with opencode itself:
    Flake.nix

      inputs = {
        ...
        # OpenCode
        opencode-flake = {
          url = "github:sst/opencode";
          inputs.nixpkgs.follows = "nixpkgs";
        };
    
      };
      outputs = {
        self,
        ...
        opencode-flake,
        ...
      } ...

    Apps.nix

    { 
      pkgs,
      config,
      nixpkgs-unstable,
      opencode-flake,
      ...
    }:
    {
      environment.systemPackages = with pkgs; [
        inputs.opencode-flake.packages.${pkgs.system}.default
        #(nixpkgs-unstable.legacyPackages.${pkgs.system}.opencode) #This didn't work before.
      ];
  9. rekram1-node commented on Dec 26, 2025

    @rekram1-node
    Collaborator

    Ah this seems like if you are on older version before we started pinning the provider packages (we had some built in but only recently did we include all of them, others were dynamically installed)

    If u upgrade to more recent versions this should be fixed.

  10. dyaskur commented on May 2, 2026

    @dyaskur

    I use latest version and still occur the same error

    Image
  11. dyaskur commented on May 2, 2026

    @dyaskur

    Sorry, turn outs I have 2 opencode installations, I remove the older one and it works

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions