Summary
I'd like to propose a Go implementation of genai-prices so that Go applications can calculate LLM inference costs using the same price data and matching logic as the existing Python and JavaScript/TypeScript packages.
Motivation
Go is widely used for backend services and infrastructure tooling, including AI-powered applications that call LLM inference APIs. Currently, Go developers who want to track or estimate LLM costs have no first-party option from this project and would need to either:
- Manually parse
prices/data.json without the matching logic
- Use a subprocess to call the Python or JS CLI
A native Go package would allow Go applications to integrate cost calculation directly, without any runtime dependencies on Python or Node.js.
Proposed scope
The Go package would aim for feature parity with the existing Python and JS/TS packages.
The price data could be embedded at build time using Go's embed package so consumers don't need to manage the JSON files separately.
Contribution offer
I'm happy to contribute an initial implementation if the maintainers are open to this feature
Summary
I'd like to propose a Go implementation of
genai-pricesso that Go applications can calculate LLM inference costs using the same price data and matching logic as the existing Python and JavaScript/TypeScript packages.Motivation
Go is widely used for backend services and infrastructure tooling, including AI-powered applications that call LLM inference APIs. Currently, Go developers who want to track or estimate LLM costs have no first-party option from this project and would need to either:
prices/data.jsonwithout the matching logicA native Go package would allow Go applications to integrate cost calculation directly, without any runtime dependencies on Python or Node.js.
Proposed scope
The Go package would aim for feature parity with the existing Python and JS/TS packages.
The price data could be embedded at build time using Go's
embedpackage so consumers don't need to manage the JSON files separately.Contribution offer
I'm happy to contribute an initial implementation if the maintainers are open to this feature