{"record":{"id":"a2681bebfff1e211","repo":"vercel/ai","slug":"no-object-generated-the-model-did-not-return-a-re","errorCode":null,"errorMessage":"No object generated: the model did not return a response.","messagePattern":"No object generated: the model did not return a response\\.","errorType":"exception","errorClass":"NoObjectGeneratedError","httpStatus":null,"severity":"error","filePath":"packages/ai/src/generate-object/generate-object.ts","lineNumber":426,"sourceCode":"        providerOptions,\n        abortSignal,\n        headers: headersWithUserAgent,\n      }),\n    );\n\n    const responseData = {\n      id: generateResult.response?.id ?? generateId(),\n      timestamp: generateResult.response?.timestamp ?? currentDate(),\n      modelId: generateResult.response?.modelId ?? model.modelId,\n      headers: generateResult.response?.headers,\n      body: generateResult.response?.body,\n    };\n\n    const text = extractTextContent(generateResult.content);\n    const reasoning = extractReasoningContent(generateResult.content);\n\n    if (text === undefined) {\n      throw new NoObjectGeneratedError({\n        message: 'No object generated: the model did not return a response.',\n        response: responseData,\n        usage: asLanguageModelUsage(generateResult.usage),\n        finishReason: generateResult.finishReason.unified,\n      });\n    }\n\n    const finishReason = generateResult.finishReason.unified;\n    const usage = asLanguageModelUsage(generateResult.usage);\n    const warnings = generateResult.warnings;\n    const resultProviderMetadata = generateResult.providerMetadata;\n    const request: Omit<LanguageModelRequestMetadata, 'messages'> =\n      generateResult.request ?? {};\n    const response: Omit<LanguageModelResponseMetadata, 'messages'> =\n      responseData;\n\n    logWarnings({\n      warnings,","sourceCodeStart":408,"sourceCodeEnd":444,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/ai/src/generate-object/generate-object.ts#L408-L444","documentation":"Within a single skill, every attached file must have a unique normalized path, because files are written relative to the skill directory and duplicates would overwrite each other. validateACPSkills tracks normalized paths per skill and throws when the same path appears twice (note: paths differing only by './' or redundant segments normalize to the same value and still count as duplicates).","triggerScenarios":"Listing the same file path twice in one skill's files array, e.g. [{path:'a.md'},{path:'./a.md'}] or 'docs/x.md' vs 'docs/../docs/x.md', when passing skills to the ACP harness.","commonSituations":"Merging file lists from multiple sources without deduplication; a glob/scan that yields the same file twice; entries that look different but normalize to the same path.","solutions":["Deduplicate the skill's files by normalized path before submitting (keep the last/ intended entry).","Rename one of the conflicting files to a distinct relative path.","Normalize each candidate path (posix normalize, strip leading './') and assert uniqueness in your loader."],"exampleFix":"// before\nfiles: [{ path: 'docs/guide.md' }, { path: './docs/guide.md' }]\n\n// after\nfiles: [{ path: 'docs/guide.md' }]","handlingStrategy":"validation","validationCode":"import path from 'node:path';\nfunction dedupeFiles(files: Array<{ path: string }>) {\n  const seen = new Set<string>();\n  return files.filter(f => {\n    const norm = path.posix.normalize(f.path);\n    if (seen.has(norm)) return false;\n    seen.add(norm);\n    return true;\n  });\n}\nskills.forEach(s => { s.files = dedupeFiles(s.files ?? []); });","typeGuard":null,"tryCatchPattern":"try {\n  await agent.addSkills(skills);\n} catch (error) {\n  if (error instanceof Error && error.message.startsWith('Duplicate ACP skill file path')) {\n    await agent.addSkills(skills.map(s => ({ ...s, files: dedupeFiles(s.files ?? []) })));\n  } else {\n    throw error;\n  }\n}","preventionTips":["Normalize (posix normalize, strip './') every file path before deduplication checks.","Deduplicate file lists whenever merging from globs or multiple sources.","Add a loader assertion that each skill's normalized file paths are unique."],"tags":["acp","validation","duplicate","skills"],"backgroundTag":"duplicate-resource","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}