Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions litellm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@
"https://serverless.tensormesh.ai/v1",
"https://api.stima.tech/v1",
"https://nano-gpt.com/api/v1",
"https://api.aitokenking.com.tw/api/v1",
"https://api.poe.com/v1",
"https://llm.chutes.ai/v1/",
"https://api.v0.dev/v1",
Expand Down Expand Up @@ -932,6 +933,7 @@
"docker_model_runner",
"ragflow",
"pinstripes", # Pinstripes - JSON-configured provider
"aitokenking",
"darkbloom",
"meta", # Meta Model API (Muse Spark) - JSON-configured provider
"cognition",
Expand Down
11 changes: 11 additions & 0 deletions litellm/llms/openai_like/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,16 @@
"temperature_max": 1.99
},
"supported_endpoints": ["/v1/chat/completions"]
},
"aitokenking": {
"base_url": "https://api.aitokenking.com.tw/api/v1",
"api_key_env": "AITOKENKING_API_KEY",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium: Provider key can be sent to a caller-controlled host

The generic JSON-provider resolver accepts the request's api_base but still falls back to this environment key when api_key is omitted. An authenticated caller can submit model: "aitokenking/..." with api_base: "https://attacker.example" and capture AITOKENKING_API_KEY from the resulting Authorization header. Require an explicit caller-supplied key whenever the base URL differs from the configured provider host, or reject such overrides before resolving the environment credential.

"api_base_env": "AITOKENKING_API_BASE",
"param_mappings": {
"max_completion_tokens": "max_tokens"
},
"supported_endpoints": [
"/v1/chat/completions"
]
}
}
Loading
Loading