Skip to content

Feature/cli#201

Merged
ahmad-ajmal merged 12 commits intomainfrom
feature/CLI
Apr 17, 2026
Merged

Feature/cli#201
ahmad-ajmal merged 12 commits intomainfrom
feature/CLI

Conversation

@korivi-CraftOS
Copy link
Copy Markdown
Collaborator

No description provided.

korivi-CraftOS and others added 12 commits April 13, 2026 16:02
Added name character limit to 20
There were two bugs fixed:

Bug 1:
`prompt_cache_key` is an OpenAI-specific routing hint in `extra_body`. xAI’s API ignores it, so it doesn’t help with cache routing for Grok.
So I skipped it when `self.provider == "grok"`.

Bug 2:
Wrong field was used for reading cached tokens:
* OpenAI → `usage.prompt_tokens_details.cached_tokens`
* Grok (xAI) → `usage.prompt_cache_hit_tokens`

----------------
The code was always reading the OpenAI field, so Grok always returned 0 cached tokens, making it look like every call was a full cache miss. I fixed this by branching on `self.provider == "grok"` to read the correct field.
Additionally, I updated the cache metrics log to show the actual provider name (grok, openai, etc.).
----------------

I updated the fixed in the same branch " feature/CLI"
- Install Issues on Mac fixed
- Python compatibility &  Syntax Issues fixed
-  CLI skills updated
- Local LLM compatibility Issues fixed
-  Image action error fixed
@ahmad-ajmal ahmad-ajmal merged commit 74aebad into main Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants