CherryHQ/cherry-studio · error · Error
String(firstPublisherError)
Error message
String(firstPublisherError)
What it means
Error "String(firstPublisherError)" thrown in CherryHQ/cherry-studio.
Source
Thrown at src/main/ai/provider/listModels.ts:288
if (firstPublisherError === undefined) {
firstPublisherError = error
}
logger.warn('Skipping Vertex publisher model listing after request failure', {
providerId: provider.id,
publisher,
error: error instanceof Error ? error.message : String(error)
})
return null
}
})
)
if (options?.throwOnError && publisherModelGroups.some((g) => g === null)) {
if (firstPublisherError instanceof Error) {
throw firstPublisherError
}
if (firstPublisherError !== undefined) {
throw new Error(String(firstPublisherError))
}
throw new Error('One or more Vertex AI publisher requests failed')
}
const publisherModels = publisherModelGroups.filter((g) => g !== null).flat()
const listedModels = dedup(publisherModels, (model) => model.name).map((model) => {
const bareId = getVertexModelId(model.name)
const ownedBy = getVertexModelPublisher(model.name)
// MaaS models are served over the OpenAI-compatible endpoint, which requires the
// `{publisher}/{model}` id form even when Google is the publisher. Native Google
// models (Gemini/Gemma/embeddings) keep their bare id.
const publisherModelId = `${ownedBy}/${bareId}`
const apiModelId = isVertexMaasModelId(publisherModelId) ? publisherModelId : bareId
return toModel(apiModelId, provider, {
name: pickPreferredString([model.displayName, bareId]) || bareId,
description: model.description,
ownedByView on GitHub (pinned to 726446b54c)
Solutions
- Inspect the first publisher error message included in the error to identify which publisher request failed and why.
- Verify Vertex AI credentials (service account, project, region) and that the Model Garden API is enabled.
- Check network access to the Vertex AI endpoints; retry after transient failures.
Example fix
Fix the underlying cause reported by the first publisher error, e.g. grant aiplatform.models.list permission to the service account.
When it happens
Trigger: Vertex AI publisher model listing is requested with throwOnError and at least one publisher request failed with a non-Error thrown value, which is stringified and re-thrown.
Common situations: Occurs when listing Vertex publisher models (Gemini/Gemma/MaaS) and one or more publisher endpoints fail — auth errors, network failures, or region unavailability — while the caller opted into fail-fast behavior instead of skipping failed publishers.
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/07f53aa080522ca2.
Report an issue: GitHub.