|
Download projects/ui/qwen-code/docs/cli/token-caching.md from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 757 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/ui/qwen-code/docs/cli/token-caching.md
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/ui/qwen-code/docs/cli/token-caching.md
-
curl -L -o token-caching.md https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/ui/qwen-code/docs/cli/token-caching.md
757 Bytes
| # Token Caching and Cost Optimization | |
| Qwen Code automatically optimizes API costs through token caching when using API key authentication (e.g., OpenAI-compatible providers). This feature reuses previous system instructions and context to reduce the number of tokens processed in subsequent requests. | |
| **Token caching is available for:** | |
| - API key users (Gemini API key) | |
| - Vertex AI users (with project and location setup) | |
| **Token caching is not available for:** | |
| - OAuth users (Google Personal/Enterprise accounts) - the Code Assist API does not support cached content creation at this time | |
| You can view your token usage and cached token savings using the `/stats` command. When cached tokens are available, they will be displayed in the stats output. | |