Roo-Code/src/utils
Daniel Trugman d6184e9dac
OpenAI & DeepSeek cost calculation (#1864)
* Add OpenAI compatible cost calculation

* Requesty: Prepare for correct price calculation

* Native OpenAI: Update model caching info

According to [OpenAI's
website](https://platform.openai.com/docs/guides/prompt-caching),
gpt-4o, gpt-4o-mini, o1-preview and o1-mini support caching.

For gpt-4o, even though gpt-4o-2024-05-13 and
chatgpt-4o-latest do no support caching, users will see there are no
cached tokens, which will help avoid confusion.

* Native OpenAI: Call getModel once

* Native OpenAI: Extract yield usage into method

* Native OpenAI: Add caching and cost info to task header

* DeepSeek: Add cost info to task header

* Add changeset
2025-02-28 11:25:17 -08:00
..
cost.test.ts OpenAI & DeepSeek cost calculation (#1864) 2025-02-28 11:25:17 -08:00
cost.ts OpenAI & DeepSeek cost calculation (#1864) 2025-02-28 11:25:17 -08:00
fs.test.ts chore: Prettier fix formatting 2025-01-06 12:41:33 -08:00
fs.ts chore: Prettier fix formatting 2025-01-06 12:41:33 -08:00
git.ts Add git context mention (#1806) 2025-02-14 19:03:11 -08:00
path.test.ts chore: Prettier fix formatting 2025-01-06 12:41:33 -08:00
path.ts chore: Prettier fix formatting 2025-01-06 12:41:33 -08:00
shell.ts Fix bug when shell profile is not found (#1671) 2025-02-06 12:12:25 -08:00
string.ts Improve diff editing prompts to avoid common deepseek issues 2024-12-28 13:21:12 -08:00