Skip to content

Implement multi-model tool library plan#1

Closed
johnnichev wants to merge 1 commit intomainfrom
cursor/implement-multi-model-tool-library-plan-gpt-5.1-codex-max-xhigh-fast-32ed
Closed

Implement multi-model tool library plan#1
johnnichev wants to merge 1 commit intomainfrom
cursor/implement-multi-model-tool-library-plan-gpt-5.1-codex-max-xhigh-fast-32ed

Conversation

@johnnichev
Copy link
Copy Markdown
Owner

Refactor the AI tool calling framework into a provider-agnostic Python library to improve modularity, extensibility, and maintainability.


Open in Cursor Open in Web

Co-authored-by: joaonichev <joaonichev@gmail.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Dec 5, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@johnnichev johnnichev closed this Dec 7, 2025
@johnnichev johnnichev deleted the cursor/implement-multi-model-tool-library-plan-gpt-5.1-codex-max-xhigh-fast-32ed branch December 7, 2025 18:34
johnnichev added a commit that referenced this pull request Mar 24, 2026
Security:
- Path traversal in JsonFileSessionStore — validate session_id (#9)
- Unicode homoglyph bypass in injection screening — NFKD + zero-width
  strip + homoglyph map (#13)

Data integrity:
- FileKnowledgeStore._save_all() atomic write via tmp + os.replace (#10)
- JsonFileSessionStore.save() atomic write (#31)

Agent core:
- astream() uses self._effective_model (was self.config.model) (#1)
- Sync _check_policy rejects async confirm_action with clear error (#2)
- Sync _streaming_call isinstance(chunk, str) guard (#18)

Providers:
- FallbackProvider stream()/astream() record success after consumption,
  not before — circuit breaker now works for streaming (#3)
- Gemini response.text ValueError catch for tool-call-only responses (#4)

Tools:
- aexecute() uses run_in_executor(None) shared executor (#5)
- execute() awaits coroutines from async tools via asyncio.run (#6)

RAG:
- Hybrid search O(n²) → O(1) via text_to_key dict lookup (#7)
- SQLiteVectorStore thread safety + WAL mode (#8)

Evals:
- OutputEvaluator catches re.error on invalid regex (#11)
- JsonValidityEvaluator respects expect_json=False (#12)

16 new regression tests. Full suite: 2000 passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants