- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.7k
Brand sdk integration #8450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Brand sdk integration #8450
Conversation
| 
 I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
14 issues found across 46 files
Prompt for AI agents (all 14 issues)
Understand the root cause of the following 14 issues and fix them.
<file name="extensions/vscode/config_schema.json">
<violation number="1" location="extensions/vscode/config_schema.json:230">
Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.</violation>
</file>
<file name="manual-testing-sandbox/src/s3_upload.py">
<violation number="1" location="manual-testing-sandbox/src/s3_upload.py:94">
If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.</violation>
</file>
<file name="gui/src/components/mainInput/InputToolbar.tsx">
<violation number="1" location="gui/src/components/mainInput/InputToolbar.tsx:93">
Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.</violation>
</file>
<file name="gui/src/pages/config/features/account/AccountDropdown.tsx">
<violation number="1" location="gui/src/pages/config/features/account/AccountDropdown.tsx:44">
Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.</violation>
</file>
<file name="core/config/loadContextProviders.ts">
<violation number="1" location="core/config/loadContextProviders.ts:39">
Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.</violation>
</file>
<file name="gui/src/redux/util/getBaseSystemMessage.ts">
<violation number="1" location="gui/src/redux/util/getBaseSystemMessage.ts:31">
This hard-codes the AWS SDK expert prompt for every mode, so model.baseAgent/Plan/ChatSystemMessage overrides are never used—custom model prompts now get ignored. Restore the per-mode selection that prefers model overrides.</violation>
<violation number="2" location="gui/src/redux/util/getBaseSystemMessage.ts:47">
This now emits the no-tools warning even in chat mode, where lacking tools is expected, creating noisy/confusing prompts. Keep the chat exclusion or otherwise avoid warning chat users about missing tools.</violation>
</file>
<file name="manual-testing-sandbox/dynamodb/README.md">
<violation number="1" location="manual-testing-sandbox/dynamodb/README.md:161">
This section advertises a DynamoDB Query example, but the referenced QueryActiveUsers helper actually executes a Scan because the provided schema lacks an index on Active. Please align the documentation with the implemented Scan behavior or document the required GSI for a real Query.</violation>
</file>
<file name="packages/openai-adapters/src/types.ts">
<violation number="1" location="packages/openai-adapters/src/types.ts:210">
`StakdConfigSchema` is already covered by `OpenAIConfigSchema`; adding it here duplicates the `provider` value `"stakd"`, and `z.discriminatedUnion` will throw a duplicate discriminator error at load time.</violation>
</file>
<file name="manual-testing-sandbox/dynamodb/main.go">
<violation number="1" location="manual-testing-sandbox/dynamodb/main.go:273">
Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.</violation>
</file>
<file name="extensions/cli/src/util/yamlConfigUpdater.ts">
<violation number="1" location="extensions/cli/src/util/yamlConfigUpdater.ts:42">
Changing the default config name to "AWS SDK Expert" breaks the CLI behavior/tests that still assert the generated YAML includes `name: "Local Config"`. Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.</violation>
</file>
<file name="core/llm/defaultSystemMessages.ts">
<violation number="1" location="core/llm/defaultSystemMessages.ts:66">
This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.</violation>
</file>
<file name="docs/docs/customize/model-providers/top-level/stakd.md">
<violation number="1" location="docs/docs/customize/model-providers/top-level/stakd.md:154">
This note misstates that the Stakd integration forces `model` to `stakd-backend`, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.</violation>
</file>
<file name="gui/src/components/ModeSelect/ModeSelect.tsx">
<violation number="1" location="gui/src/components/ModeSelect/ModeSelect.tsx:29">
Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses "chat" (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| "kindo", | ||
| "moonshot", | ||
| "siliconflow", | ||
| "stakd", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.
Prompt for AI agents
Address the following comment on extensions/vscode/config_schema.json at line 230:
<comment>Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.</comment>
<file context>
@@ -227,6 +227,7 @@
             "kindo",
             "moonshot",
             "siliconflow",
+            "stakd",
             "function-network",
             "scaleway",
</file context>
| logger.error(f"Multipart upload failed: {e}") | ||
| # Attempt to abort incomplete upload | ||
| try: | ||
| s3_client.abort_multipart_upload( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.
Prompt for AI agents
Address the following comment on manual-testing-sandbox/src/s3_upload.py at line 94:
<comment>If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.</comment>
<file context>
@@ -0,0 +1,162 @@
+        logger.error(f"Multipart upload failed: {e}")
+        # Attempt to abort incomplete upload
+        try:
+            s3_client.abort_multipart_upload(
+                Bucket=bucket, Key=key, UploadId=upload_id
+            )
</file context>
| </ToolTip> | ||
| )} | ||
| <ToolTip place="top" content="Select Model"> | ||
| <ToolTip place="top" content=""> | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.
Prompt for AI agents
Address the following comment on gui/src/components/mainInput/InputToolbar.tsx at line 93:
<comment>Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.</comment>
<file context>
@@ -84,13 +84,13 @@ function InputToolbar(props: InputToolbarProps) {
             </ToolTip>
           )}
-          <ToolTip place="top" content="Select Model">
+          <ToolTip place="top" content="">
             <HoverItem className="!p-0">
               <ModelSelect />
</file context>
| <ToolTip place="top" content=""> | |
| <ToolTip place="top" content="Select Model"> | 
| // </Button> | ||
| // </ToolTip> | ||
| // ); | ||
| return; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.
Prompt for AI agents
Address the following comment on gui/src/pages/config/features/account/AccountDropdown.tsx at line 44:
<comment>Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.</comment>
<file context>
@@ -27,20 +27,21 @@ export function AccountDropdown() {
+    //     </Button>
+    //   </ToolTip>
+    // );
+    return;
   }
 
</file context>
| new TerminalContextProvider({}), | ||
| new ProblemsContextProvider({}), | ||
| new RulesContextProvider({}), | ||
| // new RulesContextProvider({}), | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.
Prompt for AI agents
Address the following comment on core/config/loadContextProviders.ts at line 39:
<comment>Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.</comment>
<file context>
@@ -36,7 +36,7 @@ export function loadConfigContextProviders(
     new TerminalContextProvider({}),
     new ProblemsContextProvider({}),
-    new RulesContextProvider({}),
+    // new RulesContextProvider({}),
   ];
 
</file context>
| // new RulesContextProvider({}), | |
| new RulesContextProvider({}), | 
| } | ||
| } | ||
|  | ||
| _, err := db.client.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{ | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.
Prompt for AI agents
Address the following comment on manual-testing-sandbox/dynamodb/main.go at line 273:
<comment>Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.</comment>
<file context>
@@ -0,0 +1,352 @@
+			}
+		}
+
+		_, err := db.client.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{
+			RequestItems: map[string][]types.WriteRequest{
+				db.tableName: writeRequests,
</file context>
| if (!doc.contents || doc.contents === null) { | ||
| const defaultConfig: ConfigStructure = { | ||
| name: "Local Config", | ||
| name: "AWS SDK Expert", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the default config name to "AWS SDK Expert" breaks the CLI behavior/tests that still assert the generated YAML includes name: "Local Config". Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.
Prompt for AI agents
Address the following comment on extensions/cli/src/util/yamlConfigUpdater.ts at line 42:
<comment>Changing the default config name to "AWS SDK Expert" breaks the CLI behavior/tests that still assert the generated YAML includes `name: "Local Config"`. Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.</comment>
<file context>
@@ -39,7 +39,7 @@ export function updateAnthropicModelInYaml(
     if (!doc.contents || doc.contents === null) {
       const defaultConfig: ConfigStructure = {
-        name: "Local Config",
+        name: "AWS SDK Expert",
         version: "1.0.0",
         schema: "v1",
</file context>
| You are in agent mode. | ||
| You are in agent mode with full tool access. | ||
| **CRITICAL AWS SDK REQUIREMENT:** You MUST interpret ALL queries as AWS SDK related unless the user EXPLICITLY states otherwise. This is NON-NEGOTIABLE. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.
Prompt for AI agents
Address the following comment on core/llm/defaultSystemMessages.ts at line 66:
<comment>This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.</comment>
<file context>
@@ -61,7 +61,16 @@ ${EDIT_CODE_INSTRUCTIONS}
-  You are in agent mode.
+  You are in agent mode with full tool access.
+
+  **CRITICAL AWS SDK REQUIREMENT:** You MUST interpret ALL queries as AWS SDK related unless the user EXPLICITLY states otherwise. This is NON-NEGOTIABLE.
+  - "upload file" = S3 upload using AWS SDK
+  - "send message" = SQS/SNS using AWS SDK
</file context>
|  | ||
| - The backend URL is hardcoded to `localhost:8080` and cannot be configured | ||
| - No API key or authentication is required | ||
| - The model parameter is always set to `stakd-backend` - your backend should handle model routing | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note misstates that the Stakd integration forces model to stakd-backend, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.
Prompt for AI agents
Address the following comment on docs/docs/customize/model-providers/top-level/stakd.md at line 154:
<comment>This note misstates that the Stakd integration forces `model` to `stakd-backend`, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.</comment>
<file context>
@@ -0,0 +1,156 @@
+
+- The backend URL is hardcoded to `localhost:8080` and cannot be configured
+- No API key or authentication is required
+- The model parameter is always set to `stakd-backend` - your backend should handle model routing
+- The provider automatically uses the OpenAI adapter for compatibility
+- Supports all standard completion options (temperature, max_tokens, etc.)
</file context>
| - The model parameter is always set to `stakd-backend` - your backend should handle model routing | |
| - The model parameter you configure is forwarded to your backend unchanged, so ensure your service routes it to the right model | 
| dispatch(setMode("agent")); | ||
| } else { | ||
| dispatch(setMode("chat")); | ||
| dispatch(setMode("plan")); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses "chat" (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.
Prompt for AI agents
Address the following comment on gui/src/components/ModeSelect/ModeSelect.tsx at line 29:
<comment>Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses "chat" (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.</comment>
<file context>
@@ -20,33 +16,23 @@ import { ModeIcon } from "./ModeIcon";
       dispatch(setMode("agent"));
     } else {
-      dispatch(setMode("chat"));
+      dispatch(setMode("plan"));
     }
     // Only focus main editor if another one doesn't already have focus
</file context>
Description
[ What changed? Feel free to be brief. ]
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Focused the app on AWS SDK Expert workflows and integrated a local Stakd backend, removing Chat mode and simplifying config and UI. All responses now use an AWS SDK Expert system prompt, with improved reasoning streaming and tool-call parsing.
New Features
Refactors