feat(codebase-navigator): add OpenAI port of augmented LLM tutorial - #33
Open
teamauresta wants to merge 2 commits into
Open
feat(codebase-navigator): add OpenAI port of augmented LLM tutorial#33teamauresta wants to merge 2 commits into
teamauresta wants to merge 2 commits into
Conversation
Port 01_codebase_navigator.py (Anthropic) to the OpenAI API as 02_augmented_llm_openai.py. Closes agenticloops-ai#13. - Use openai.OpenAI() with Chat Completions API - Convert Anthropic tool definitions (input_schema) to OpenAI function calling format (function.parameters) in _build_tool_definitions() - Use OpenAITokenTracker from common for token usage tracking - Append one tool message per tool_call_id (OpenAI requirement) - Reuse all existing tools/, store/, and indexer/ modules unchanged - Add openai>=1.0.0 to pyproject.toml dependencies - Update README examples table with new script row
amrynsky
requested changes
Mar 6, 2026
Contributor
There was a problem hiding this comment.
let's use 01_codebase_navigator_openai name to be consistent
Rename to follow consistent naming convention used across the module, matching the pattern of 01_codebase_navigator.py. Addresses review feedback from @amrynsky.
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
Closes #13 — ports the Codebase Navigator (Augmented LLM) tutorial from the Anthropic SDK to the OpenAI API.
What changed
New file:
01-foundations/06-codebase-navigator/02_augmented_llm_openai.pyopenai.OpenAI()with the Chat Completions APIinput_schema) to OpenAI function calling format (function.parameters) inside_build_tool_definitions()OpenAITokenTrackerfromcommonfor token usage trackingtoolmessage pertool_call_id(OpenAI protocol requirement)tools/,store/, andindexer/modules without modificationUpdated:
pyproject.toml— addedopenai>=1.0.0to dependenciesUpdated:
README.md— added02_augmented_llm_openai.pyrow to the examples table; removed the now-resolved contributions calloutTesting
ruff check 02_augmented_llm_openai.py— ✅ all checks passedruff format --check 02_augmented_llm_openai.py— ✅ already formattedOPENAI_API_KEYsettools/,store/,indexer/) reused unchanged