Skip to content
Open

Dev #12313

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ jobs:
git tag -a "v${current_package_version}" -m "Release v${current_package_version}"
git push origin "v${current_package_version}" --no-verify
echo "Successfully created and pushed git tag v${current_package_version}"
- name: Publish Extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
current_package_version=$(node -p "require('./src/package.json').version")
pnpm --filter roo-cline publish:marketplace
echo "Successfully published version $current_package_version to VS Code Marketplace"
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/nightly-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,3 @@ jobs:
EOF
- name: Build VSIX
run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npx vsce publish --packagePath "bin/$(/bin/ls bin | head -n1)"
- name: Publish to Open VSX Registry
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx ovsx publish "bin/$(ls bin | head -n1)"
27 changes: 0 additions & 27 deletions .husky/pre-commit

This file was deleted.

42 changes: 0 additions & 42 deletions .husky/pre-push

This file was deleted.

4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
corepack prepare pnpm@10.8.1 --activate
pnpm -v
cd src
pnpm vsix
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# OpenAI-compatible reasoning payload shim

Date: 2026-05-09

## Problem

OpenAI-compatible request path currently sends `reasoningEffort` into AI SDK, but it does not add Responses-style `reasoning` payload.

User expectation for OpenAI-compatible requests with reasoning enabled:

- keep `reasoning_effort`
- also send `reasoning: { effort, summary: "auto" }`

This should match OpenAI Codex / OpenAI Native behavior shape, while staying inside OpenAI-compatible chat completions path.

## Goals

- When resolved model params include `reasoningEffort`, send both:
- `reasoning_effort`
- `reasoning: { effort, summary: "auto" }`
- Apply same behavior for:
- `createMessage`
- `completePrompt`
- Keep `reasoning_effort` value unchanged, including extended values like `xhigh` or `none` when current model/settings resolve them.
- Leave request unchanged when reasoning is off.

## Non-goals

- No change to `openai.ts`.
- No change to `openai-native.ts` or `openai-codex.ts`.
- No UI/settings changes.
- No new provider capability detection.

## Design

### 1) Pass reasoning to AI SDK provider

`OpenAICompatibleHandler` will build `providerOptions` for `streamText` and `generateText`.

Use generic AI SDK key:

```ts
providerOptions: {
openaiCompatible: {
reasoningEffort: model.reasoningEffort,
},
}
```

Only include this block when `model.reasoningEffort` is defined.

### 2) Add request-body transform hook

Extend `OpenAICompatibleConfig` with AI SDK `transformRequestBody` hook and pass it into `createOpenAICompatible(...)`.

Hook behavior:

- if body has no `reasoning_effort`, return body unchanged
- if body has `reasoning_effort`, add/update:
```ts
reasoning: {
effort: body.reasoning_effort,
summary: "auto",
}
```
- keep `reasoning_effort` in body
- preserve other fields

This hook must apply to both streaming and non-streaming calls, because AI SDK uses same provider transform for both.

### 3) Keep logic localized

Implement inside `src/api/providers/openai-compatible.ts` only.

Reason:

- current `OpenAICompatibleHandler` is only consumer path
- current OpenAI-compatible provider family is Moonshot
- local change keeps scope tight and avoids touching shared reasoning transforms for unrelated providers

## Data flow

1. `MoonshotHandler.getModel()` resolves final `reasoningEffort` from settings/model defaults.
2. `OpenAICompatibleHandler.createMessage()` / `completePrompt()` pass `providerOptions.openaiCompatible.reasoningEffort` into AI SDK.
3. AI SDK serializes top-level `reasoning_effort`.
4. `transformRequestBody` adds `reasoning: { effort, summary: "auto" }` when `reasoning_effort` exists.
5. Provider receives both fields.

## Fallback behavior

- No reasoning selected: no `providerOptions`, no `reasoning`, no `reasoning_effort`.
- Disabled reasoning: same as above.
- Extended values: pass through unchanged.
- If body already contains `reasoning`, overwrite `effort` and `summary` only; do not drop unrelated keys.

## Tests

Add tests around current Moonshot/OpenAI-compatible path:

1. **Constructor wiring**

- `createOpenAICompatible` receives `transformRequestBody`.

2. **Streaming request**

- `createMessage()` passes `providerOptions.openaiCompatible.reasoningEffort` when enabled.
- transform adds both `reasoning_effort` and `reasoning`.

3. **Non-streaming request**

- `completePrompt()` uses same providerOptions path.
- transform adds both fields.

4. **Disabled path**

- when reasoning is disabled, request has neither `reasoning_effort` nor `reasoning`.

5. **Extended effort path**
- `xhigh` stays `xhigh` in both fields.

Prefer a small pure helper or captured transform callback in test so request-body mapping is asserted directly, not through SDK internals.

## Acceptance criteria

- OpenAI-compatible requests with reasoning enabled send both fields.
- `reasoning_effort` still exists.
- `reasoning.summary` is always `auto`.
- Behavior matches in stream and completion paths.
- No changes to unrelated provider paths.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Disable local commit/push checks design

Date: 2026-05-10

## Problem
Repo currently enforces local Git checks through Husky hooks:
- `.husky/pre-commit` blocks commits to `main`
- `.husky/pre-commit` runs `lint-staged`
- `.husky/pre-commit` runs `pnpm lint`
- `.husky/pre-push` blocks pushes to `main`
- `.husky/pre-push` runs `check-types`
- `.husky/pre-push` may run tests
- `.husky/pre-push` prints changeset reminder

User wants all local commit/push enforcement removed.
User also wants `lint-staged` config removed from `package.json`.

## Goals
- Remove all local Husky checks from commit and push workflow.
- Remove branch protection logic from local Husky hooks.
- Remove `lint-staged` configuration from root `package.json`.
- Keep normal repo scripts (`lint`, `check-types`, `test`, etc.) available for manual use.

## Non-goals
- No CI workflow changes.
- No package script removals for `lint`, `check-types`, `test`, or `build`.
- No Husky uninstall.
- No change to hooks other than commit/push hooks.

## Design
### 1) Delete commit/push hook entrypoints
Delete:
- `.husky/pre-commit`
- `.husky/pre-push`

Result:
- no local commit blocking on `main`
- no local push blocking on `main`
- no automatic `lint-staged`, `lint`, `check-types`, test, or changeset reminder during commit/push

### 2) Keep Husky base wiring intact
Keep:
- `.husky/_/**`
- root `package.json` script: `"prepare": "husky"`

Reason:
- smallest change for requested scope
- avoids changing global Git hook bootstrap behavior
- commit/push checks disappear because entrypoint hook files are gone

### 3) Remove lint-staged config from package.json
Delete root-level `lint-staged` block from `package.json`.

Reason:
- user explicitly asked to remove it
- after deleting `.husky/pre-commit`, this config is unused
- removes stale config from repo root

## Data flow after change
Before:
1. `git commit` -> Husky runs `.husky/pre-commit`
2. hook blocks `main`, runs `lint-staged`, runs `pnpm lint`
3. `git push` -> Husky runs `.husky/pre-push`
4. hook blocks `main`, runs `check-types`, optional tests, changeset reminder

After:
1. `git commit` -> no repo-defined pre-commit entrypoint
2. `git push` -> no repo-defined pre-push entrypoint
3. manual checks still possible via package scripts

## Risks
- Developers can commit/push broken code locally without warning.
- Developers can commit/push directly to `main` locally unless remote branch protections exist.
- Formatting on staged files will no longer run automatically.

These risks are accepted by request.

## Testing
- Verify `.husky/pre-commit` no longer exists.
- Verify `.husky/pre-push` no longer exists.
- Verify `package.json` no longer contains `lint-staged` block.
- Optional smoke check: `git status` and `git commit` path should no longer invoke repo checks.

## Acceptance criteria
- `.husky/pre-commit` deleted.
- `.husky/pre-push` deleted.
- root `package.json` no longer contains `lint-staged` config.
- `prepare: husky` remains unchanged.
- local commit/push no longer run repo-defined checks.
Loading
Loading