fix: docs corrections and dead code cleanup#172
Open
dorukardahan wants to merge 1 commit into0gfoundation:mainfrom
Open
fix: docs corrections and dead code cleanup#172dorukardahan wants to merge 1 commit into0gfoundation:mainfrom
dorukardahan wants to merge 1 commit into0gfoundation:mainfrom
Conversation
1. README: Node.js requirement 22.0.0 → 20.0.0 (matches package.json engines field and CI matrix which tests both 20.x and 22.x) 2. getRequestHeaders JSDoc: fix wrong method call in @example - Was calling getServiceMetadata twice (second should be getRequestHeaders) - Remove non-existent serviceName parameter - Fix message role from "system" to "user" - Fix headers placement in OpenAI SDK call 3. response.ts: remove duplicate chatID null check (dead code) - Line 38 already returns null if !chatID - Second check at line 54 was unreachable - Replace console.warn with existing logger.warn (3 occurrences) 4. request.ts: remove commented-out import Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@dorukardahan is attempting to deploy a commit to the 0g-Frontend Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small fixes found during SDK audit — all verified against source code.
Changes
1. README: Node.js version mismatch
>= 22.0.0, package.json says>= 20.0.0, CI tests both 20.x and 22.x>= 20.0.02.
getRequestHeadersJSDoc example (broker.ts)The
@examplehad two bugs:getServiceMetadatainstead ofgetRequestHeadersfor the headers callserviceNameparameterAlso fixed
role: "system"→role: "user"and headers placement in the OpenAI SDK call.3. Dead code in response.ts
Duplicate
if (!chatID)check — line 38 already returnsnull, so the second check at line 54 was unreachable:Also replaced 3
console.warncalls with the existinglogger.warnimport (per CLAUDE.md SDK rules).4. Commented-out import in request.ts
Removed
// import { Verifier } from './verifier'Verification
All changes verified against actual TypeScript signatures before committing. No behavioral changes — only docs and dead code removal.
🤖 Generated with Claude Code