feat: enhance token estimation and context limit handling in strategy configurations

This commit is contained in:
Dean
2026-03-27 14:31:56 +08:00
committed by shinchan-zhai
parent 6cb6c31b34
commit 95e76f6a56
7 changed files with 78 additions and 56 deletions
+3
View File
@@ -392,6 +392,9 @@ func (client *Client) String() string {
client.Provider, client.Model)
}
// BaseClient returns the underlying *Client (satisfies ClientEmbedder interface).
func (c *Client) BaseClient() *Client { return c }
// IsRetryableError determines if error is retryable (network errors, timeouts, etc.)
func (client *Client) IsRetryableError(err error) bool {
errStr := err.Error()