๐—š๐—ต๐—ถ๐˜๐—›๐˜‚๐—ฏ ๐—–๐—ผ๐—ฝ๐—ถ๐—น๐—ผ๐˜ ๐—ก๐—ผ๐˜„ ๐—–๐—ต๐—ฎ๐—ฟ๐—ด๐—ฒ๐˜€ ๐—ฃ๐—ฒ๐—ฟ ๐—ง๐—ผ๐—ธ๐—ฒ๐—ป

GitHub Copilot changed its pricing model. It moved from a fixed monthly fee to a token-based model. This change caused a 150% increase in my recent bill.

A token is a small piece of a word. One word usually equals 1 to 3 tokens. Now, every prompt you send and every line of code you receive costs money.

High token usage happens when you write long, wordy prompts. You can reduce costs by 70% by using shorter, focused prompts.

Compare these two prompts:

Bad Prompt (500 tokens): "Can you please help me write a Python function that will take a list of dictionaries as input, and then sort these dictionaries based on a specific key value, but only if that key exists?"

Good Prompt (150 tokens): "Python: sort list of dicts by key. Key missing? Place at end."

The second prompt gives similar results for much less money.

How to manage your AI costs:

Managing AI costs is a new skill for developers. You must balance productivity with your budget. Use AI strategically instead of using it blindly.

Source: https://dev.to/merbayerp/github-copilot-now-charges-per-token-the-bill-shock-3k2

Optional learning community: https://t.me/GyaanSetuAi