Speckle stream in Rhino Compute - How to get proper model URL?

Hey! Thanks for the detailed context. You’re absolutely on the right track, and you’ve pinpointed the core of the issue: legacy vs. next-gen URL schemas. refer: The Great Rename

Grasshopper v2 (which you’re using) still outputs legacy-style Speckle stream URLS — like the ones you see in your screenshot:

  • https://app.speckle.systems/streams/c7ea.../commits/34524b...legacy commit URL
  • https://app.speckle.systems/projects/c7ea.../models/..... ← newer URL scheme

Whereas the Viewer API in the Speckle Advanced Setup expects:
https://app.speckle.systems/projects/{projectId}/models/{modelId}
Or to load a specific version:
https://app.speckle.systems/projects/{projectId}/models/{modelId}@{versionId}

To use UrlHelper.getResourceUrls(url, authToken) successfully, make sure your URL is in the next-gen format and includes both the project and model ID.

So you’ll need to extract the modelId as well, either:

  1. Manually (for now) — open the project page, copy the full model link from the UI.
  2. Programmatically (ideal) — but that’ll require modifying your GH script to output project and model IDs using next-gen naming.

Since your current GH script outputs legacy URLS, you can:

  • Parse the commit URL (which contains the stream ID and commit ID),
  • And convert it into the newer structure with:
    https://app.speckle.systems/projects/{streamId}/models/{modelId}

But here’s the catch: You also need the modelId, which is not included in first commit URL. So… a bit of text manipulation might be required.

The upcoming Grasshopper connector (new gen) will deprecate streams, branches, commits entirely. Instead, it will directly operate on:

  • Projects
  • Models
  • Versions

So once that’s in your hands, this will be seamless — GH will return viewer-ready URLS directly.


TL;DR

  • You’re seeing legacy URLS; the viewer expects next-gen.
  • You need to obtain the model ID.
  • Best practice = use the new URL pattern: https://app.speckle.systems/projects/{projectId}/models/{modelId}
  • You can manually look it up for now or query the API.
  • Future GH connector will make this native.