mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
feat: 问就是封包
This commit is contained in:
@@ -159,7 +159,7 @@ export async function getAnthropicClient({
|
||||
? process.env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION
|
||||
: getAWSRegion()
|
||||
|
||||
const bedrockArgs: ConstructorParameters<typeof AnthropicBedrock>[0] = {
|
||||
const bedrockArgs: any = {
|
||||
...ARGS,
|
||||
awsRegion,
|
||||
...(isEnvTruthy(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH) && {
|
||||
@@ -290,7 +290,7 @@ export async function getAnthropicClient({
|
||||
const vertexArgs: ConstructorParameters<typeof AnthropicVertex>[0] = {
|
||||
...ARGS,
|
||||
region: getVertexRegionForModel(model),
|
||||
googleAuth,
|
||||
googleAuth: googleAuth as any,
|
||||
...(isDebugToStdErr() && { logger: createStderrLogger() }),
|
||||
}
|
||||
// we have always been lying about the return type - this doesn't support batching or models
|
||||
|
||||
@@ -108,7 +108,7 @@ export function getPromptTooLongTokenGap(
|
||||
return undefined
|
||||
}
|
||||
const { actualTokens, limitTokens } = parsePromptTooLongTokenCounts(
|
||||
msg.errorDetails,
|
||||
msg.errorDetails as string,
|
||||
)
|
||||
if (actualTokens === undefined || limitTokens === undefined) {
|
||||
return undefined
|
||||
@@ -148,7 +148,7 @@ export function isMediaSizeErrorMessage(msg: AssistantMessage): boolean {
|
||||
return (
|
||||
msg.isApiErrorMessage === true &&
|
||||
msg.errorDetails !== undefined &&
|
||||
isMediaSizeError(msg.errorDetails)
|
||||
isMediaSizeError(msg.errorDetails as string)
|
||||
)
|
||||
}
|
||||
export const CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE = 'Credit balance is too low'
|
||||
|
||||
Reference in New Issue
Block a user