refactor: eliminate duplicate code across LLM provider and agent layers - #108
Open
BaSui01 wants to merge 10 commits into
Open
refactor: eliminate duplicate code across LLM provider and agent layers#108BaSui01 wants to merge 10 commits into
BaSui01 wants to merge 10 commits into
Conversation
… GitHub Actions - Update CI workflow and golangci configuration - Clean up .arts and .codeartsdoer artifacts - Add dev-to-master auto-merge workflow - Update .gitignore and config/api.go
- align go-arch-lint with recursive package matching and guard pkg/httpclient - repair coverage and benchmark package gates used by CI - remove broken dev-to-master auto-merge workflow - fix flaky/runtime tests and offline tokenizer coverage - add durable memory backend tests required by current package set Co-authored-by: Codex <noreply@openai.com>
- split overloaded tools capabilities into registry/discovery/execution/remote/store helpers while keeping root facades - unify tokenizer contracts and execution option clone generation - improve provider multimodal reuse, RAG runtime performance, DAG scheduling, memory persistence, guardrails authz, streaming reliability, and handler error utilities - add focused regression and coverage tests for the open issue set Fixes #13 Fixes #14 Fixes #15 Fixes #25 Fixes #26 Fixes #27 Fixes #28 Fixes #29 Fixes #33 Fixes #39 Fixes #44 Fixes #45 Fixes #81 Co-authored-by: Codex <noreply@openai.com>
… download is forbidden
LLM Provider Layer:
- Extract shared tool_choice resolution into openai_sdk_helpers.go
- Merge buildSDKResponseToolChoice + buildSDKInputTokenToolChoice (~47 lines)
- Add llmcore.InvokeChat() helper to eliminate 3 duplicate gateway invoke patterns
- Add types.NewSimpleChatRequest() factory for 4 adapter files
Agent Layer:
- Replace 30+ inline Message{Role:X} with existing NewUserMessage/NewSystemMessage
- Unify ChatRequest construction via types.NewSimpleChatRequest
- Clean remaining inline Message in prompt_context_runtime.go and react.go
Docs & infra sync: README, architecture docs, routes, resilience configs
Net: ~243 lines of duplicate code eliminated, 134 lines of shared infrastructure added
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
added 4 commits
May 14, 2026 02:45
- README/README_EN version bump - docs: update CN/EN tutorials and navigation - llm/gateway: optimizations - rag/runtime: hybrid retrieval improvements - workflow/core: dag executor fixes - agent: a2a client, hierarchical agent fixes
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
Eliminated ~243 lines of duplicate code, added ~134 lines of shared infrastructure.
LLM Provider
Agent Layer