Qwen 매개변수 및 프로토콜 차이
호환 프로토콜에서 Qwen 모델의 매개변수 차이와 사용 방법을 알아봅니다.
Qwen은 이 페이지에 따라 매개변수를 조정하세요. 구조: Chat Completions, Responses, Messages.
| 모델 | 적용 범위 |
|---|
| qwen3.8-max-0902, qwen3.8-flash, qwen3.8-max | 모두 세 프로토콜 지원. 공통 규칙 통합, 미디어 범위는 아래 표 |
| 필드 | 차이 설명 |
|---|
enable_thinking, reasoning_effort | 기본 추론, 실효 강도 low/medium/xhigh, 기본 xhigh. minimal→low, high/max→xhigh, none은 끔 |
thinking_budget | reasoning_effort과 함께 설정하면 오류. 강도만 설정하면 low/medium/xhigh은 각각 예산 4096/16384/262144 |
max_tokens, max_completion_tokens | max_tokens은 답변만 제한하고 공식 폐기 예정. 신규는 max_completion_tokens로 추론/답변 총합 제한 |
temperature | 범위 [0,2), 추론 시 텍스트 기본 1.0, 시각 0.6; 0.6 미만은 0.6. 비추론 기본 0.7 |
top_p, top_k | top_p 범위 (0,1], 추론/비추론 기본 0.95/0.8. 확장 top_k은 음이 아닌 정수, 기본 20; null 또는 100 초과 시 Top-K 꺼짐 |
repetition_penalty | Qwen 확장, 0 초과, 기본 1.0. OpenAI 두 페널티와 다름 |
preserve_thinking | 기본 활성화. assistant의 reasoning_content에 원본 추론 재전송, content에 합치지 않음. 추론 미전송 자체로 오류는 아님 |
tool_choice | auto/none 지원. 추론 시 required/함수 강제 불가. 비추론은 함수 지정 가능하지만 required도 호출 보장 안 함 |
tool_stream | 기본 false, stream=true일 때만 복잡한 인수 증분 출력. Max 텍스트만, Flash 모든 모달리티 |
response_format | json_object/json_schema 지원. 전자는 프롬프트에 JSON 단어 필요, 후자는 response_format.json_schema로 정의. 추론 해제 불필요 |
enable_search, search_options | enable_search 기본 false, search_options.forced_search는 검색 강제. 대상은 turbo/max, include_tool_usage=true이면 실제 통계 usage.x_tools |
| 필드 | 차이 설명 |
|---|
reasoning.effort | none/low/medium/xhigh 지원, 기본 xhigh; minimal→low, high/max→xhigh |
enable_thinking | 호환 스위치는 추후 중단, reasoning.effort 권장. 함께 보내면 reasoning.effort 우선 |
max_output_tokens | 최소 16, 추론과 답변 포함 |
text.format | text/json_object/json_schema 지원, JSON Schema는 text.format.json_schema에 name/schema/strict, 원본의 평면 구조와 다름 |
tool_choice | auto/none/required과 allowed_tools 객체 지원, required는 목록에 도구 한 개일 때만 |
tools | 함수 외 web_search, web_extractor, code_interpreter 등 지원. 웹 추출은 검색과 함께, 코드 실행기는 추론 필요 |
store, previous_response_id, conversation | 서버 이력 지원, store 기본 true, 응답 ID 7일 유효. 뒤 두 필드 동시 불가 |
background 및 기타 확장 | 백그라운드 비동기 미지원. 공식 Responses에 없는 OpenAI 매개변수는 무시 |
| 필드 | 차이 설명 |
|---|
thinking.type | enabled/disabled 지원, 기본 추론, Claude의 adaptive 사용하지 않음 |
output_config.effort | low/medium/xhigh, 기본 xhigh; high/max→xhigh. Chat의 모든 호환값을 옮기지 않음 |
thinking.budget_tokens | 공식 폐기 예정. 신규는 output_config.effort, 이전 예산 사용 시 max_tokens이 그보다 커야 함 |
max_tokens | 필수, Qwen3.8은 추론/답변 총합 제한 |
temperature, messages[].role | 온도 [0,2); 역할은 user/assistant 외 system도 가능 |
tool_result.content | 도구 결과 문자열. 객체/배열은 직렬화, Claude 블록 배열 사용하지 않음 |
output_config.format | 엄격 JSON Schema 지원. type: "json_schema", Schema는 schema, additionalProperties는 false |
tools의 web_search | 검색 이름 web_search, 유형은 web_search_20250305 등 날짜 포함. HTTP / SDK는 system에 클라이언트 ID x-anthropic-billing-header: cc_entrypoint=cli; 추가 |
| 필드 | 차이 설명 |
|---|
| 암시적 캐시 | 자동 활성화, 같은 접두사 최소 1024 Token, 매번 적중 보장 아님 |
| Chat / Messages 명시적 캐시 | 블록에 cache_control: { type: "ephemeral" }, 최소 1024 Token, 5분 유효 및 적중 시 갱신, 최대 4개 |
| 명시적 캐시 위치 | System은 블록 배열 필요. 도구 정의는 접두사에 포함되지만 정의에만 단 표시는 무시. 다른 TTL/중단점은 옮기지 않음 |
| Responses Session 캐시 | Header x-dashscope-session-cache: enable으로 켬, 기본 disable. Session을 꺼도 자동 암시적 캐시는 유지 |
| 캐시 사용량 | Chat usage.prompt_tokens_details.cached_tokens, Responses usage.input_tokens_details.cached_tokens, Messages usage.cache_read_input_tokens, usage.cache_creation_input_tokens |
MODEL_ID을 전체 ID로 바꾸고 본인 API Key를 사용하세요.
curl 'https://api.agtcloud.cn/v1/chat/completions' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
--data '{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "API 시간 초과 진단 방법을 세 가지로 설명하세요"}],
"reasoning_effort": "low",
"max_completion_tokens": 4096
}'