Miniblog

Petites réflexions

Filtré par aiLLM Tous les tags

  • My token budget is starting to burn fast. Here are the token optimizations I've done to reduce the cost for OpenCode.

    • Install RTK.
      • Reduce shell output. See here for the supported commands.
    • Install Codegraph.
      • Remember to codegraph init new repository !
      • Make sure that the MCP server is live.
    • Install OpenSlimedit.
      • The code source is very tiny. It basically compress built-in tool descriptions that are frequently used, and perform additional little optimisations here and there.
    • Use cheaper models for subagents.

    Excluded plugins

    • Dynamic Context Pruning Plugin : Not particularily convinced that it would reduce cost. Especially when I read their section Impact on Prompt Caching that kinda confirm my skepticism :

      Trade-off: Pruning reduces context size but can increase cache misses. The cost balance depends on your conversation, compression frequency, and provider pricing.

      Cache misses were exactly a significant part of my tokens cost. No point to risk it only to figure out what "intelligently" managed conversation ever mean.

    • OpenCode Snip : Used to reduce the output of shell commands. Most certainly redunding with RTK.

    Publié il y a 2 sem. · Mis à jour la semaine dernière
  • 除了主要使用的LLM之外,有時會用到Deepseek的API。

    上個月,該公司公佈了要改採尖離峰價,價格差達兩倍之多。尖峰時間,簡單而言就是北京上班時間(不包括中午休息及大陸地區假日)。

    對東亞時區的使用者來說,Deepseek或許不再有低價的吸引力。對歐洲就絲毫無任何改變,因為離峰時間對應的是下午至午夜。

    某位兄臺為此做了一面DeepSeek尖離峰時段價格時鐘,供大家參考。

    Publié il y a 2 sem.