News:

OS2World.com Forum is back !!!

Remember to visit OS2World at:
http://www.os2world.com

Main Menu

Phaedra v0.93

Started by fr4nk, September 11, 2026, 11:36:40 AM

Previous topic - Next topic

fr4nk

Quote from: JPM on October 09, 2026, 02:45:49 PMHi Frank, I noticed that with larger menu fonts, Phaedra's tab bar is partially hidden behind the menu bar.

Hi JPM, i addressed this issue with phaeadra-scaling_fix.zip in Message 57. Did you use this test version?

JPM

Yes, I completely missed that one. Apparently, reading helps!

fr4nk

This is a hotfix for Phaedras AI assistent.

If you don't use AI features, you might skip this update.


Download v0.99-8

fr4nk

#63
Version 0.99-9 comes with import and export functions for a couple of codepages (incl. UTF-8 and Windows).

Note: Phaedra works intern with your system cp and can only write things to a file you can see on the screen.

It requires iconv. Installation, e.g. via:
yum install libiconv-utils

The AI Assistant requires iconv aswell, you might have it already on your disk.

Happy testing! I'll have a break from this project for some days. See you laters!

Download V 0.99-9


Dariusz Piatkowski

Quote from: fr4nk on October 08, 2026, 09:59:48 PM...
Could you both checkout this phaedra.exe, if it does the trick?
...

Sorry about a bit of a delay in responding, happened to be in the Algonquin Park (Ontario, Canada) doing a bit of backcountry canoeing with my daughter while freezing off parts I didn't even know I had!!! lol (OK, it did get to -5C for those who just started to think I was being a little sissy)

Indeed, the text is no longer being clipped, looks good here, thank you!

fr4nk

Phaedra 1.0

Download Phaeadra 1.0


New: Support for server-side "Explicit Caching" of static instruction files (master prompts, etc.). This saves real money (up to 90% in token costs—the larger the instructions, the higher the savings). Note that this works exclusively with Gemini; OpenAI does not offer this feature.

Detailed information can be found in the file README_AI.TXT under chapter:
1.3  Explicit Context Caching

Users who do not use the AI assistant with Gemini can safely skip this update. Anyone using Gemini should DEFINITELY install it.


Martin Iturbide

Thanks. I just uploaded to Hobbes too.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

fr4nk

Thanks, Martin.

Guys, please be careful with explicit caching in version 1.0. Check both the Gemini pricing page and Phaedra's readme_ai.txt. There are scenarios where this caching strategy makes total sense, but others where storage costs can make it quite expensive. For example, keeping cache active for 48 hours while only sending 10 requests in one hour will drive costs up. On the other hand, it's very cost-effective if you're sending high volumes of requests with large instructions or reference documents.

Either way, it significantly speeds things up: faster uploads and lower latency responses.

If you're unsure about how this works, hold off on Phaedra 1.0 with Gemini for now and stick with the previous version that relies on implicit caching.

Also, if your instructions and prompt combined are under 20 KB (which is already quite substantial), Gemini won't store it in the cache anyway, so it won't matter which Phaedra version you run.

Or stick to OpenAI at this moment.

I plan to add a toggle to enable/disable explicit caching, along with a button to clear the cache manually so you can avoid unnecessary storage fees once your session wraps up.

I still need a moment to map out the implementation. I noticed Google just rolled out Gemini v4, which I'll be adding support for in Phaedra. Funnily enough, explicit caching seems to be disabled in 4.0... ??? Truly a moving target. This will be fun! :D

fr4nk

New in Version 1.1:

Download Phaedra V1.1

- Support for the brand-new Gemini Version 4 - Argon

- Explicit Cache can now be toggled on or off (sidebar checkbox)
  Not sure? Leave it off!

- [Del Cache] button: Allows cleaning up all active server caches (prompts for confirmation for each model individually).

- Cache duration changed from 48 hours to 1 hour: Reset to 1 hour of remaining time with every request (Send). Prevents unnecessary storage costs during inactivity.

All of this is AI-related. If you do not use AI features, you can safely skip this update.


Explicit Caching vs. Implicit Caching - wth?

Whenever a request is sent to the AI, all data must be transmitted. The provider (Google for Gemini) calculates the cost based on the volume of data. Put simply: more data equals higher costs.

If this data (e.g., system instructions, instruction files, etc.) remains identical in the initial block, Google applies "Implicit Caching" by default. This means Google decides on the server side what to keep temporarily in memory. A substantial discount is applied to that identical portion on rapid subsequent requests.

Example: You send 40 KB of data, and the next time 40 KB of completely different data. You pay for the full 80 KB (Gemini calculates in tokens, but the concept is the same).
However, if you send the exact same 40 KB of instructions shortly after, you pay full price for the first 40 KB and receive a significant discount on the repeated portion.

Alternatively, you can cache data intentionally: Explicit Caching.
Here, the instruction block (from 20 KB in size) is permanently stored on the Google server once as a cache object. All following requests only reference the Cache ID. This drastically cuts transfer overhead and input costs. In return, Google charges a small storage fee per hour from the moment of creation.

For this reason, the cache duration in Phaedra is set to 1 hour: every click on [Send] extends the active window back to a full hour. After 60 minutes of inactivity, the cache expires automatically on the server, or you can purge it immediately using [Del Cache].


When is which approach worth it?

- Huge instructions and many requests within an hour: Explicit Caching is significantly cheaper.

- Small amounts of data (under 20 KB) or infrequent requests: Use Implicit Caching or standard mode.

- Most expensive scenario: Sending large amounts of data every 20 to 30 minutes without Explicit Cache. At these intervals, neither the server buffer nor permanent discounts usually take effect.


Too complicated? Starting with Gemini 4, this is eliminated: Explicit Caching is no longer supported by the V4 API; everything is handled automatically via Implicit Caching. The "temperature" setting is also omitted in V4 (the model regulates this internally).


BUT:

V4 Argon is brand new and noticeably more expensive. For OS/2 and REXX tasks, gemini-3.8-flash (Thinking Level set to Low) is completely sufficient. For complex algorithms, 3.1 Pro (Thinking Level on Low or Medium) remains the recommended choice.

fr4nk


This hotfix addresses a crash inside the "Save as" routine.

Download v 1.1-2 (exe only)

fr4nk


New in Phaedra 1.3:

  • Fix: Optimized handling of large files and data blocks.
  • Fix: Resolved a timing/resizing glitch when resizing the window rapidly.
  • Fix: Prevented collision between REXX comments and Markdown formatting markers while printing.
  • Optimized: Improved request and payload processing for Gemini AI.
  • New: Added native Anthropic Claude API support (untested, I have no account yet).
  • New: Integrated Files API support for Google Gemini (verified) and Anthropic Claude (untested).
  • New: Create delimited code blocks (cblocks) directly from the Range menu.
  • New: Navigate and toggle between code blocks sequentially.
  • New: Added extended document statistics to the "Tab Properties" dialog.

Download (complete archive):

Phaedra 1.30

There is a manual README_CBLOCKS.TXT [Menu "CBlocks help"] for the cblock feature. Have a look at this, it is one of my most used features now. Just open it and jump with CTRL+TAB through the blocks it is fun and very handy. :)


Martin Iturbide

Thanks Frank. I just upload it to HobbesGram too.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

fr4nk

#72
Thank you, Martin. New Hobbes looks good!

Here is a little text about Files Api compared with Explicit Caching im Gemini or Claude. I add this later to the README.

1. How It Works (Gemini & Claude)

In Phaedra, you can choose between Explicit Caching, the Files API, or standard uncached transmission:

  • Explicit Caching:
    • Mechanism: System instructions and context are cached server-side to avoid reprocessing on every turn.
    • Gemini 3.x: Compiles a dedicated server-side cache object starting at a minimum size of >= 20 KB (approx. 5,000+ tokens).
    • Claude (Sonnet): Uses native ephemeral prompt caching breakpoints (extended-cache-ttl beta) directly within the request payload.
    • Lifetime (TTL): Both providers use a rolling lifetime of 1 hour (1h TTL) in Phaedra.
  • Files API:
    • Mechanism: Files (instructions or document content) are uploaded as standalone resources to Google or Anthropic servers. Subsequent requests only reference the generated file_uri (Gemini) or file_id (Claude).
    • Requirement / Threshold: No minimum size required (also works below 20 KB).
    • Lifetime: Uploaded Gemini files remain valid for 48 hours (managed via a local 47-hour safety limit). Uploaded Anthropic files remain persistent on the server until modified locally or cleared via Phaedra's cache cleanup.
    • Prefix / Implicit Caching: Phaedra sorts all instruction files alphabetically at the beginning of the payload. On Gemini, this deterministic prefix automatically triggers Implicit Prefix Caching. On Claude, Files API uploads can also be combined with explicit 1h cache control (not yet implemented, you can select Files API or Explicit Caching, not both. Coming soon.)

2. Costs ("Rent" / Storage)

  • File Storage (Rent):
    • Storing/retaining files via the Files API on Google or Anthropic servers incurs no storage fees.
  • Token Billing:
    • Explicit Cache: Cached input tokens are billed at a massive discount (up to 75-90% savings on cache reads compared to standard input tokens).
    • Files API: Prevents repeated uploads of large text files and leverages server-side caching mechanisms to keep token costs low.

3. Performance & Latency

  • Network Transfer (Payload):
    • In both methods (and for both Gemini and Claude), the local transfer payload shrinks from many kilobytes down to just a few hundred bytes, as only file IDs/URIs or cache references are transmitted. This completely prevents UI freezes under OS/2.
  • Processing Latency (TTFT):
    • Explicit Cache: Very low Time-To-First-Token (TTFT), since the context already sits pre-compiled in the server's KV cache.
    • Files API: Fast setup for modular or smaller files because files are only uploaded once and automatically updated by Phaedra only when their local timestamp or size changes.

Summary

  • Explicit Caching: Best suited for static, large instruction sets within a contiguous work session (1h TTL on Gemini 3.x and Claude).
  • Files API: Maximum flexibility with no minimum size, free server storage (48h on Gemini, persistent on Claude), and minimal local network overhead.