Repository navigation
merge: sync QuantumNous/main (hosted-tool relay rework #7135 #7137) - #9
Merged
Merged
Conversation
…, and billing usage integrity (QuantumNous#7137) * feat(relaykit): preserve hosted tools across conversions - add protocol-neutral hosted-tool DTOs, conversion metadata, and loss policies - bridge citations, grounding metadata, and hosted-tool stream lifecycles - document the public conversion behavior and channel policy controls * refactor(relaykit): normalize reasoning and thinking intent - centralize provider-neutral reasoning intent, effort, and budget mappings - parse model suffixes at the host entry boundary while preserving provider-owned tails - keep adaptive Claude thinking and explicit zero-token compatibility consistent * fix(billing): preserve authoritative usage across relay hops - carry native BillingUsage sidecars through direct and streamed protocol bridges - merge partial and terminal usage monotonically with safe fallback settlement - retain cache metadata, penultimate usage, and per-call Gemini tool surcharges * feat(relay): bridge Responses with Claude and Gemini protocols - add direct request, response, and stream converters across supported relay formats - expose Claude count_tokens and Chat-to-Responses compatibility endpoints - carry conversion diagnostics through the host while retaining the curated public goldens * fix(relay): wire relaykit conversions into host channels - connect handlers, adaptors, and channel settings to the standalone conversion layer - keep model mapping, pricing identity, retries, and provider-specific suffix behavior aligned - ignore local audit artifacts and retain focused public regression coverage
QuantumNous#7137) keeping fork customizations Upstream picks: - fix(model): no-op system task state writes no longer treated as lock loss (QuantumNous#7135) - feat(relay): hosted-tool conversion fidelity, reasoning normalization, and billing usage integrity (QuantumNous#7137) Conflict resolution: - relay/common/relay_info.go: keep fork's UserQuota int64 wallet-cap widening while adopting upstream's BillingModelName / ReasoningConversion fields Verified (amd64): root go build, relaykit GOWORK=off go build, go vet relay/common/service/model, go test ./service ./relay/common/... ./model ./controller, full relaykit go test ./... Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Agent
Links
User request
用户要求:"继续查询并解决冲突" —— 即继续检查 fork 与上游 QuantumNous/new-api 的差异并解决同步冲突。
Out of scope — refuse
Kind
Issue facts
not applicable(无缺陷;纯上游变更吸收)
Change
将上游 QuantumNous/new-api main(
0ed497f06)同步合入 fork main:b7017c251fix(model): no-op 系统任务状态写入不再被误判为丢失锁(fix: do not treat no-op system task state writes as lock loss QuantumNous/new-api#7135)0ed497f06feat(relay): hosted-tool 转换保真、reasoning 归一化与计费用量完整性(feat(relay): hosted-tool conversion fidelity, reasoning normalization, and billing usage integrity QuantumNous/new-api#7137)唯一冲突文件
relay/common/relay_info.go:采用上游新增的BillingModelName、ReasoningConversion字段与结构重排,同时保留 fork 的UserQuota int64(钱包容量 $2m 拆分契约定制)。service/quota.go、service/billing_session.go中 fork 的 int64 适配由自动合并保留并通过编译。Research
Duplicate / prior art
dca725904rc.29 follow-up 同步),非重复:这是新一批上游提交的吸收。Docs and code
git merge-tree --write-tree main upstream/main仅报relay/common/relay_info.go一处冲突;fork 定制点为该文件两处 int64(字段声明 +GetContextKeyInt64)。Alternatives considered
git merge真实合并 + 编译/测试验证(采用,保证合并提交与历史可信)Files
Behavior
Verification
go build ./...通过(web/dist 占位后)cd relaykit && GOWORK=off go build ./...通过go vet ./relay/common/... ./service/... ./model/...通过go test ./service ./relay/common/... ./model ./controller -count=1全部 okgo test ./... -count=1全绿(exit 0)Risks
UserQuota int64与上游新代码若存在 int 假设会在编译期暴露——已编译通过;上游 relayconvert 行为变化量大,依赖其自带测试套件(本地全绿)Scope check