feat: copilot attachment support (#160)

Carlos Alexandro Becker created

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Change summary

cmd/copilot/main.go                     |  2 ++
internal/providers/configs/copilot.json | 24 ++++++++++++------------
2 files changed, 14 insertions(+), 12 deletions(-)

Detailed changes

cmd/copilot/main.go 🔗

@@ -51,6 +51,7 @@ type Limits struct {
 type Supports struct {
 	ToolCalls         bool `json:"tool_calls,omitempty"`
 	ParallelToolCalls bool `json:"parallel_tool_calls,omitempty"`
+	Vision            bool `json:"vision,omitempty"`
 }
 
 type Policy struct {
@@ -159,6 +160,7 @@ func modelToCatwalk(m Model) catwalk.Model {
 		Name:             m.Name,
 		DefaultMaxTokens: int64(m.Capabilities.Limits.MaxOutputTokens),
 		ContextWindow:    int64(m.Capabilities.Limits.MaxContextWindowTokens),
+		SupportsImages:   m.Capabilities.Supports.Vision,
 	}
 }
 

internal/providers/configs/copilot.json 🔗

@@ -16,7 +16,7 @@
       "context_window": 144000,
       "default_max_tokens": 16000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -29,7 +29,7 @@
       "context_window": 160000,
       "default_max_tokens": 16000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -42,7 +42,7 @@
       "context_window": 216000,
       "default_max_tokens": 16000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -55,7 +55,7 @@
       "context_window": 144000,
       "default_max_tokens": 16000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -68,7 +68,7 @@
       "context_window": 128000,
       "default_max_tokens": 64000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -107,7 +107,7 @@
       "context_window": 400000,
       "default_max_tokens": 128000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -120,7 +120,7 @@
       "context_window": 264000,
       "default_max_tokens": 64000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -133,7 +133,7 @@
       "context_window": 264000,
       "default_max_tokens": 64000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -146,7 +146,7 @@
       "context_window": 400000,
       "default_max_tokens": 128000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -159,7 +159,7 @@
       "context_window": 400000,
       "default_max_tokens": 128000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -172,7 +172,7 @@
       "context_window": 264000,
       "default_max_tokens": 64000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {
@@ -185,7 +185,7 @@
       "context_window": 400000,
       "default_max_tokens": 128000,
       "can_reason": false,
-      "supports_attachments": false,
+      "supports_attachments": true,
       "options": {}
     },
     {