@vellumai/plugin-api 0.9.0-dev.202606191225.6c07f1c → 0.9.0-dev.202606191410.d7a0797
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3046,6 +3046,18 @@ export declare interface Provider {
|
|
|
3046
3046
|
*/
|
|
3047
3047
|
tokenEstimationProvider?: string;
|
|
3048
3048
|
sendMessage(messages: Message[], options?: SendMessageOptions): Promise<ProviderResponse>;
|
|
3049
|
+
/**
|
|
3050
|
+
* Exact prompt-token count from the provider's own tokenizer, for the
|
|
3051
|
+
* `messages` + `systemPrompt` + `tools` composition the next call would
|
|
3052
|
+
* send. Optional: providers without a token-counting endpoint omit it, and
|
|
3053
|
+
* callers must fall back to the local estimator (`estimatePromptTokens`).
|
|
3054
|
+
*
|
|
3055
|
+
* This runs a dedicated counting request (no inference), so it carries a
|
|
3056
|
+
* network round-trip and the provider's own rate limit — use it for
|
|
3057
|
+
* user-initiated, occasional actions (e.g. `/compact`), never on the
|
|
3058
|
+
* per-turn hot path.
|
|
3059
|
+
*/
|
|
3060
|
+
countInputTokens?(messages: Message[], systemPrompt: string, tools?: ToolDefinition_2[]): Promise<number>;
|
|
3049
3061
|
}
|
|
3050
3062
|
|
|
3051
3063
|
export declare type ProviderEvent = {
|
package/package.json
CHANGED