> [!IMPORTANT]
> This is a major release of Langfuse as it requires to run a [one-off (non-blocking) migration script](https://langfuse.com/changelog/2024-01-29-custom-model-prices#upgrade-path) on historical data to ensure accurate LLM costs in Langfuse.
> - No changes are required if you use Langfuse Cloud or are only concerned about newly ingested traces.
> - There are no other breaking changes.
What's Changed
* **Fully rebuilt usage/cost tracking of LLM generations in Langfuse** by maxdeichmann and marcklingen
* New _model definition_ abstraction which allows to:
* Quickly support newly emerging models.
* Track changes in model prices over time.
* Add custom models/prices at the project level.
* You can also set (token) usage and cost via the API when ingesting traces.
* Usage and cost information on all UI tables and APIs.
* See [changelog](https://langfuse.com/changelog/2024-01-29-custom-model-prices) and [docs](https://langfuse.com/docs/model-usage-and-cost) for full details on this change.
* Other changes
* feat(ui): add improved prompt ui with better versioning by RichardKruemmel in https://github.com/langfuse/langfuse/pull/961
* feat(ui): filtering by scores to the generations table in https://github.com/langfuse/langfuse/pull/880
* feat: add new openai model prices by maxdeichmann in https://github.com/langfuse/langfuse/pull/967
* feat(db): improve seeding script for prompts by RichardKruemmel in https://github.com/langfuse/langfuse/pull/965
* fix(security): add validation for html in inputs by RichardKruemmel in https://github.com/langfuse/langfuse/pull/927
* fix(sessions): composite ids by marcklingen in https://github.com/langfuse/langfuse/pull/946
* fix(ui): retrieve prompts created via API by maxdeichmann in https://github.com/langfuse/langfuse/pull/963
* fix: error log for api prompts by RichardKruemmel in https://github.com/langfuse/langfuse/pull/966
* chore(deps): bump dependencies in https://github.com/langfuse/langfuse/pull/970, https://github.com/langfuse/langfuse/pull/936, https://github.com/langfuse/langfuse/pull/979, https://github.com/langfuse/langfuse/pull/986, https://github.com/langfuse/langfuse/pull/983, https://github.com/langfuse/langfuse/pull/985
* refactor: typing of AutoCompleteOption by marcklingen in https://github.com/langfuse/langfuse/pull/978
* refactor: db logging in dev mode by maxdeichmann in https://github.com/langfuse/langfuse/pull/952
**Full Changelog**: https://github.com/langfuse/langfuse/compare/v1.34.1...v2.0.0