Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Image attachment support exists in all SDKs but was undocumented, leading users to believe the feature was missing.

Changes

Added "Image Support" section to each SDK README documenting:

  • Image attachments via the attachments parameter
  • Implicit image access via the agent's view tool
  • Supported formats (JPG, PNG, GIF, etc.)

Example

Python:

await session.send({
    "prompt": "What's in this image?",
    "attachments": [
        Attachment(type="file", path="/path/to/image.jpg")
    ]
})

Alternative using agent's view tool:

await session.send({"prompt": "What does the most recent jpg in this directory portray?"})

Examples adapted to each SDK's language conventions (TypeScript, Go, C#).

Original prompt

This section details on the original issue you should resolve

<issue_title>Question: Do the SDKs supports image attachments?</issue_title>
<issue_description>I can't seem to find any documentation or api reference about image inputs... as the SDK (I'm primarily going to use Python) seems to lack support for images?

Would really be useful especially involving certain use cases like UI to code</issue_description>

<agent_instructions>Add a paragraph about image support to each of the SDK readmes, look at the examples given by @friggeri in the comments to this issue</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@friggeri Thanks for the question @zavocc, this should be better documented, when you submit a prompt using [`CopilotSessionsend`](https://github.com/github/copilot-sdk/blob/main/python/copilot/session.py#L72) you can pass an [`attachments`](https://github.com/github/copilot-sdk/blob/main/python/copilot/types.py#L27-L30) option, if you pass a path to an image it will be attached to your request, for example:
session.send({
  "prompt": "what's in this image?",
  "attachments": [
    Attachment(
      type="file",
      path="/path/to/image.jpg"
    )
  ]
)

In addition, the agent's view tool has the ability to read images, so you could also do:

session.send({"prompt": "what does the most recent jpg in this directory portray?"})
```</body></comment_new>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for image attachments in SDKs Document image attachment support in SDK READMEs Jan 23, 2026
Copilot AI requested a review from friggeri January 23, 2026 17:24
@friggeri friggeri marked this pull request as ready for review January 23, 2026 19:00
@friggeri friggeri requested a review from a team as a code owner January 23, 2026 19:00
Copilot AI review requested due to automatic review settings January 23, 2026 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the previously undocumented image attachment feature in all SDK READMEs. The feature allows users to attach images to prompts either explicitly via the attachments parameter or implicitly through the agent's built-in view tool.

Changes:

  • Added "Image Support" section to Python, TypeScript, Go, and C# SDK READMEs
  • Documented image attachment via attachments parameter with code examples
  • Documented alternative approach using agent's view tool for implicit image access
  • Listed supported image formats (JPG, PNG, GIF, etc.)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
python/README.md Added Image Support section with Python-specific syntax for image attachments
nodejs/README.md Added Image Support section with TypeScript-specific syntax for image attachments
go/README.md Added Image Support section with Go-specific syntax for image attachments
dotnet/README.md Added Image Support section with C#-specific syntax for image attachments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

patniko
patniko previously approved these changes Jan 23, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

✅ Cross-SDK Consistency Review

This PR maintains excellent consistency across all four SDK implementations. Here's what I verified:

✅ All SDKs Updated

All four SDK READMEs have been updated with parallel "Image Support" sections:

  • Node.js/TypeScript: ✅ Added at line 186
  • Python: ✅ Added at line 158
  • Go: ✅ Added at line 115
  • .NET: ✅ Added at line 203

✅ Consistent Documentation Structure

Each SDK's documentation follows the same pattern:

  1. Section title: "## Image Support"
  2. Introduction explaining the attachments parameter (with language-appropriate casing)
  3. Code example showing explicit image attachment
  4. Explanation of supported formats
  5. Alternative approach using agent's view tool

✅ Respects Language Conventions

The examples correctly adapt to each language's idioms:

  • TypeScript/Python: attachments (camelCase/snake_case parameter)
  • Go: Attachments field in MessageOptions struct (PascalCase for exported fields)
  • .NET: Attachments property with typed collections (PascalCase, explicit types)

✅ API Consistency

All SDKs use the same underlying structure:

  • Attachment type: "file"
  • Required fields: type and path
  • Same prompt examples across all languages

Summary

No consistency issues found. This PR documents an existing feature uniformly across all SDK implementations without creating any feature parity gaps. The documentation is well-aligned and respects each language's conventions while maintaining semantic equivalence.

AI generated by SDK Consistency Review Agent

@friggeri friggeri added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit 22eba84 Jan 23, 2026
24 of 27 checks passed
@friggeri friggeri deleted the copilot/add-image-support-documentation branch January 23, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Do the SDKs supports image attachments?

3 participants