axios+telemetry cleanup
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
API_PDF_MAX_PAGES,
|
||||
PDF_TARGET_RAW_SIZE,
|
||||
} from '../../constants/apiLimits.js'
|
||||
import { FEEDBACK_CHANNEL } from '../../constants/product.js'
|
||||
import { isEnvTruthy } from '../../utils/envUtils.js'
|
||||
import { formatFileSize } from '../../utils/format.js'
|
||||
import { ImageResizeError } from '../../utils/imageResizer.js'
|
||||
@@ -685,7 +686,7 @@ export function getAssistantMessageFromError(
|
||||
}
|
||||
|
||||
if (process.env.USER_TYPE === 'ant') {
|
||||
const baseMessage = `API Error: 400 ${error.message}\n\nRun /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`
|
||||
const baseMessage = `API Error: 400 ${error.message}\n\nRun /share and post the JSON file to ${FEEDBACK_CHANNEL}.`
|
||||
const rewindInstruction = getIsNonInteractiveSession()
|
||||
? ''
|
||||
: ' Then, use /rewind to recover the conversation.'
|
||||
@@ -760,8 +761,8 @@ export function getAssistantMessageFromError(
|
||||
const orgId = getOauthAccountInfo()?.organizationUuid
|
||||
const baseMsg = `[ANT-ONLY] Your org isn't gated into the \`${model}\` model. Either run \`claude\` with \`ANTHROPIC_MODEL=${getDefaultMainLoopModelSetting()}\``
|
||||
const msg = orgId
|
||||
? `${baseMsg} or share your orgId (${orgId}) in ${MACRO.FEEDBACK_CHANNEL} for help getting access.`
|
||||
: `${baseMsg} or reach out in ${MACRO.FEEDBACK_CHANNEL} for help getting access.`
|
||||
? `${baseMsg} or share your orgId (${orgId}) in ${FEEDBACK_CHANNEL} for help getting access.`
|
||||
: `${baseMsg} or reach out in ${FEEDBACK_CHANNEL} for help getting access.`
|
||||
|
||||
return createAssistantAPIErrorMessage({
|
||||
content: msg,
|
||||
|
||||
Reference in New Issue
Block a user