Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply cache control correctly to tools #1071

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

yingjiehe-xyz
Copy link
Collaborator

fix #1066

Test:

Enable tools and see higher cache_discount

{
  "data": {
    "id": "gen-1738712804-5wvhsREvgvXR99HBpioS",
    "upstream_id": "msg_01GQ8Vs5vVjo3C5viSgEYjsm",
    "total_cost": 0.0028803,
    "cache_discount": 0.0042687,
    "provider_name": "Anthropic",
    "created_at": "2025-02-04T23:46:48.29004+00:00",
    "model": "anthropic/claude-3.5-sonnet",
    "app_id": 1784029,
    "streamed": true,
    "cancelled": false,
    "latency": 1191,
    "moderation_latency": 205,
    "generation_time": 1780,
    "tokens_prompt": 1099,
    "tokens_completion": 103,
    "native_tokens_prompt": 1758,
    "native_tokens_completion": 125,
    "native_tokens_reasoning": 0,
    "is_byok": false,
    "finish_reason": "stop",
    "native_finish_reason": "stop",
    "usage": 0.0028803
  }
}

@yingjiehe-xyz yingjiehe-xyz merged commit 40ac1cd into main Feb 5, 2025
4 checks passed
@yingjiehe-xyz yingjiehe-xyz deleted the yingjiehe/update branch February 5, 2025 19:30
michaelneale added a commit that referenced this pull request Feb 6, 2025
* main:
  Respect the terminal emulator's base colors (#1098)
  fix: add fallback sans-serif font to desktop app (#982)
  feat: add bedrock provider (#1069)
  feat: removed minHeight (#938)
  fix: add logs for goose run (#1085)
  docs: add langfuse observability guide (#1047)
  docs: updated bluesky link (#1078)
  docs: jetbrains tutorial (#1074)
  docs: add simple docs link (#1077)
  fix: apply cache control correctly to tools (#1071)
  fix: show default value when adding new one (#1057)
  fix it to use env vars if available (#1063)
  docs site: add PR previews (#865)
  chore: Better typing for preload.ts (#1055)
  fix: Allow port 443 to be used with https (ollama provider) (#1052)
Acumen-Desktop pushed a commit to Acumen-Desktop/goose that referenced this pull request Feb 7, 2025
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.

OpenRouter/Claude Sonnet caching not reducing costs
2 participants