Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3910319
llm-cost as system policy
Saadha123 Mar 10, 2026
49c1b57
custom pricing tests and api allowed kinds fix
Saadha123 Mar 10, 2026
1f834be
modified custom pricing rates
Saadha123 Mar 10, 2026
bce74f9
Fixed anthropic model prices
Saadha123 Mar 10, 2026
e1d53e5
Fixed anthropic tier token calculation
Saadha123 Mar 10, 2026
0ea782c
Fixed anthropic cache write and multiplier pricing logic
Saadha123 Mar 10, 2026
74a1fe4
tool cost calculation for anthropic
Saadha123 Mar 11, 2026
5f96690
Updated anthropic response structure
Saadha123 Mar 11, 2026
04c0c96
gemini multimodal cost cal support
Saadha123 Mar 11, 2026
381132f
gemini tool use prompt tokens
Saadha123 Mar 11, 2026
30cf6b0
gemini integration tests
Saadha123 Mar 11, 2026
6788db7
mistral calculayion fixes
Saadha123 Mar 12, 2026
7529395
integration test for mistral calculation
Saadha123 Mar 12, 2026
302586f
openai cost calculation
Saadha123 Mar 12, 2026
4d9b60a
removed references and shortened comments
Saadha123 Mar 12, 2026
25dab2c
Removed system cost policy
Saadha123 Mar 13, 2026
22f6515
Fixes
Saadha123 Mar 13, 2026
6912446
Fixed path
Saadha123 Mar 13, 2026
608f102
Fixed path
Saadha123 Mar 13, 2026
236cd54
Stop tracking [verify-llm-cost.py](http://verify-llm-cost.py/)
Saadha123 Mar 13, 2026
c94fe7c
Revert changes
Saadha123 Mar 13, 2026
e369510
Revert changes
Saadha123 Mar 13, 2026
fffd10b
Fix
Saadha123 Mar 13, 2026
ae19b6b
Added integration tests for llm-cost and llm-cost-based-ratelimit com…
Saadha123 Mar 14, 2026
2d0c4db
Updated integration tests
Saadha123 Mar 15, 2026
e17f4f3
New integration test
Saadha123 Mar 16, 2026
7ec568a
Added llm-cost and llm-cost-based-ratelimit with published gomodule r…
Saadha123 Mar 16, 2026
698f23f
remove custom pricing json
Saadha123 Mar 16, 2026
998b764
remove custom pricing json
Saadha123 Mar 16, 2026
be0efbf
remove custom pricing json file
Saadha123 Mar 16, 2026
b39c3ef
updated default policies
Saadha123 Mar 16, 2026
3b0e0a0
updated policy definition
Saadha123 Mar 16, 2026
6307ee0
cost based ratelimit integration tests
Saadha123 Mar 16, 2026
0d6c119
Updated policy def file
Saadha123 Mar 16, 2026
4fada45
Minor fix
Saadha123 Mar 16, 2026
acd9d08
Added x-wso2-policy-advanced-param
Saadha123 Mar 17, 2026
9b4beaa
revert
Saadha123 Mar 17, 2026
a699aac
remove verify script from gitignore
Saadha123 Mar 17, 2026
1545fc3
Updated policy def
Saadha123 Mar 17, 2026
db4a2e0
Updated config.toml
Saadha123 Mar 17, 2026
144a502
updated suite_test
Saadha123 Mar 17, 2026
712e48a
added more llm-cost tests for llm-cost-based-ratelimit.feature
Saadha123 Mar 17, 2026
1142f1e
deleted unnecessary it files
Saadha123 Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ platform-api/src/data
platform-api/src/resources/openapi_with_binding.yaml

# Gateway
gateway/gateway-runtime/target
gateway/gateway-runtime/target
6 changes: 6 additions & 0 deletions gateway/build-lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ policies:
- name: subscription-validation
version: v0.2.0
gomodule: github.com/wso2/gateway-controllers/policies/subscription-validation@v0
- name: llm-cost
version: v0.1.0
gomodule: github.com/wso2/gateway-controllers/policies/llm-cost@v0
- name: llm-cost-based-ratelimit
version: v0.1.0
gomodule: github.com/wso2/gateway-controllers/policies/llm-cost-based-ratelimit@v0
4 changes: 4 additions & 0 deletions gateway/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ policies:
gomodule: github.com/wso2/gateway-controllers/policies/json-xml-mediator@v0
- name: subscription-validation
gomodule: github.com/wso2/gateway-controllers/policies/subscription-validation@v0
- name: llm-cost
gomodule: github.com/wso2/gateway-controllers/policies/llm-cost@v0
- name: llm-cost-based-ratelimit
gomodule: github.com/wso2/gateway-controllers/policies/llm-cost-based-ratelimit@v0

7 changes: 7 additions & 0 deletions gateway/configs/config-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ als_plain_text = true
max_message_size = 1000000000
max_header_limit = 8192

# =============================================================================
# POLICY CONFIGURATIONS
# =============================================================================

[policy_configurations.llm_cost_v0]
pricing_file = "/home/wso2/conf/llm-pricing/model_prices.json"

# =============================================================================
# TRACING CONFIGURATION
# =============================================================================
Expand Down
Loading
Loading