refactor: switch models to gpt-5.6 tiers with reasoning_effort=none - #63
Open
teddylee777 wants to merge 1 commit into
Open
refactor: switch models to gpt-5.6 tiers with reasoning_effort=none#63teddylee777 wants to merge 1 commit into
teddylee777 wants to merge 1 commit into
Conversation
## What Changed
- Default model is now gpt-5.6-terra (medium); small-model slots use
gpt-5.6-luna (low); gpt-5.6-sol (high) only in the reasoning_effort demo
- Every init_chat_model()/ChatOpenAI() carries reasoning_effort="none";
string models passed to create_agent / ModelFallbackMiddleware /
SummarizationMiddleware are now model instances
- Models notebook: explanatory note on why reasoning is disabled;
reasoning_effort section updated; multimodal demo uses a repo-local
sample income-statement image instead of a dead external URL
- Messages notebook: image URL examples point at a repo-hosted image
- QuickStart time-travel: select the checkpoint by next == ("tools",)
instead of an exact message count that varies by model
- Manual-state-update: question explicitly asks for a web search so the
tool-call edit flow has a tool call to edit
- RAG helpers/notebooks: pull_prompt(..., dangerously_pull_public_prompt=True)
as required by langsmith >= 0.8
- Pin arxiv < 3.0 (langchain-community ArxivRetriever uses the removed
Search.results() API in arxiv 4.x)
## Root Cause
gpt-5.6 models reject function tools on the Chat Completions endpoint
unless reasoning is disabled (or the Responses API is used), and several
example inputs/URLs were model- or environment-dependent.
## Test Plan
- [x] Live API: sol/terra/luna invoke, tool calling, ToolStrategy and
auto response_format, streaming, v3 stream_events, logprobs
- [x] 49 notebooks executed headlessly with nbconvert; all cells pass
except intentional error demos, external services (Postgres,
Ollama, MCP HTTP), an input() cell, and long non-streaming calls
cut off at 30s by the local HTTP proxy (verified OK without proxy)
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.
Context Block
Summary
gpt-5.6-terra(medium), 소형 모델 슬롯gpt-5.6-luna(low),gpt-5.6-sol(high)은reasoning_effort예제에만 사용.init_chat_model()/ChatOpenAI()호출에reasoning_effort="none"추가. gpt-5.6 계열은 Chat Completions 에서 추론이 켜진 상태로 함수 도구를 쓸 수 없기 때문 (400 Function tools with reasoning_effort are not supported ... set reasoning_effort to 'none'). 문자열로 전달되던 모델(create_agent(model="..."),ModelFallbackMiddleware,SummarizationMiddleware)은 인스턴스로 변경.OPENAI_API_KEY만으로 전체 실습 실행 가능.response.content는 여전히 문자열 (Responses API 미사용).Changes
gpt-5.4→gpt-5.6-terra,gpt-5.4-mini→gpt-5.6-luna; 모든 모델 생성에reasoning_effort="none"PART01/Ch01/01-LangGraph-Models.ipynbreasoning_effort="none"배경 설명 노트 추가; reasoning 절을gpt-5.6-sol기준으로 갱신; 멀티모달 예제를 저장소 로컬 이미지(assets/finance-statement-sample.png, 신규)로 교체PART01/Ch01/02-LangGraph-Messages.ipynbPART01/Ch01/01-QuickStart-LangGraph-Tutorial.ipynbstate.next == ("tools",)기준으로== 6은 모델의 병렬 도구 호출 수에 따라 달라짐PART05/Ch15/07-LangGraph-Manual-State-Update.ipynbAppendix/**/rag/base.py,PART03/Ch10/server/rag/base.py, RAG 노트북 4개pull_prompt(..., dangerously_pull_public_prompt=True)pyproject.toml,uv.lockarxiv>=2.4.1,<3.0고정ArxivRetriever가 arxiv 4.x 에서 제거된Search.results()사용README.mdreasoning_effort="none"안내Test Plan
invoke,create_agent+tool,ToolStrategy, autoresponse_format,stream, v3stream_events,logprobs, 이미지 입력(URL/로컬)jupyter nbconvert --execute49개 노트북 (실제 API 키 사용)nbformat.validate+ 코드 셀compile()전체,ruff/py_compile변경 .pyuv lock/uv sync실행 예외 (코드 결함 아님): 의도된 오류 시연 셀(존재하지 않는 모델명, Pydantic 검증 오류), 외부 서비스 필요(Postgres, Ollama, Neo4j, MCP HTTP 서버,
input()), 그리고 로컬 HTTP 프록시(HTTP_PROXY=127.0.0.1…)가 30초 이상 무응답 연결을 끊어 발생한 장문 non-streaming 호출 3건 — 프록시 우회 시 동일 요청 124초 후 정상 완료 확인.Documentation Gate
docs/없음, README.md 본 PR 에서 갱신).Related Issues
Refs #61, #62
Checklist