| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/commit/:name(/*path) |
| route-controller | commit |
| route-action | show |
| fetch-nonce | v2:03a104cf-12e4-7fd0-64ac-68969fe4bca3 |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | BD82:38E6D:13545E5:196F277:6AED7525 |
| html-safe-nonce | 8690613b6126fc26e8f37ea0672b05256d5a4ef746a267323d8fe676b2a24a16 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDgyOjM4RTZEOjEzNTQ1RTU6MTk2RjI3Nzo2QUVENzUyNSIsInZpc2l0b3JfaWQiOiIzMzIwMjU0NTM5MDMyNzg2MjEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2ac11d249c4ef80ebcdacb8ce0828986b63203ceb8ca09f0cf135fb3317cd12d |
| hovercard-subject-tag | repository:644461337 |
| github-keyboard-shortcuts | repository,commits,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///commit/show |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/vercel/ai/commit/b192878 |
| twitter:image | https://opengraph.githubassets.com/34f003f366263afe3056e77572925cf016f5ada2e753537b2f238d423f854a3f/vercel/ai/commit/b192878a5db13eb47fa8e8a0ad5218a1e5a947eb |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34f003f366263afe3056e77572925cf016f5ada2e753537b2f238d423f854a3f/vercel/ai/commit/b192878a5db13eb47fa8e8a0ad5218a1e5a947eb |
| og:image:alt | …de (#18219)
## Background
https://github.com/vercel/ai/issues/18142
Previously, code mode required passing tools directly into
`createCodeModeTool` but we wanted one shared tools object and exp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:updated_time | 1785449208 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-cache |
| go-import | github.com/vercel/ai git https://github.com/vercel/ai.git |
| octolytics-dimension-user_id | 14985020 |
| octolytics-dimension-user_login | vercel |
| octolytics-dimension-repository_id | 644461337 |
| octolytics-dimension-repository_nwo | vercel/ai |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 644461337 |
| octolytics-dimension-repository_network_root_nwo | vercel/ai |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | commits |
| Skip to content | https://redirect.github.com/vercel/ai/commit/b192878#start-of-content |
| https://redirect.github.com/ |
| Sign in | https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvercel%2Fai%2Fcommit%2Fb192878 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvercel%2Fai%2Fcommit%2Fb192878 |
| Sign up | https://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fcommit%2Fshow&source=header-repo&source_repo=vercel%2Fai |
| Reload | https://redirect.github.com/vercel/ai/commit/b192878 |
| Reload | https://redirect.github.com/vercel/ai/commit/b192878 |
| Reload | https://redirect.github.com/vercel/ai/commit/b192878 |
| vercel | https://redirect.github.com/vercel |
| ai | https://redirect.github.com/vercel/ai |
| Code | https://redirect.github.com/vercel/ai |
| Issues475 (475) | https://redirect.github.com/vercel/ai/issues |
| Pull requests1k (1k) | https://redirect.github.com/vercel/ai/pulls |
| Actions | https://redirect.github.com/vercel/ai/actions |
| Projects | https://redirect.github.com/vercel/ai/projects |
| Security and quality6 (6) | https://redirect.github.com/vercel/ai/security |
| Insights | https://redirect.github.com/vercel/ai/pulse |
| https://redirect.github.com/vercel/ai |
| Browse files | https://redirect.github.com/vercel/ai/tree/b192878a5db13eb47fa8e8a0ad5218a1e5a947eb |
| https://redirect.github.com/vercel/ai/tree/b192878a5db13eb47fa8e8a0ad5218a1e5a947eb |
| https://redirect.github.com/aayush-kapoor |
| aayush-kapoor | https://redirect.github.com/vercel/ai/commits?author=aayush-kapoor |
| #18219 | https://github.com/vercel/ai/pull/18219 |
| #18142 | https://github.com/vercel/ai/issues/18142 |
| #18142 | https://github.com/vercel/ai/issues/18142 |
| af3f400 | https://redirect.github.com/vercel/ai/commit/af3f40029794dfa5424aa43e01f7964f81a75818 |
| quick-callers-route.md | https://redirect.github.com/vercel/ai/commit/b192878#diff-dc86488a86daf69b5574eb40fbc69a329105eae237d2124ba20a7a232aded5b6 |
| 18-code-mode.mdx | https://redirect.github.com/vercel/ai/commit/b192878#diff-aec1b29a4b7d4a535b0df1d685ebade7ceabd833c93ac3538d626a73bce5b6d0 |
| 01-generate-text.mdx | https://redirect.github.com/vercel/ai/commit/b192878#diff-e8bc910a48f7543dfff8bd7c953b13f9788e41443be7917f0b2843d71e3ecfc0 |
| code-mode-with-openai-programmatic.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-f8af6ad79687d22b3d1639e8a5b63b7fef44daa660d049763659ad94b4dc393d |
| code-mode.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-06dc26a97805ddbde578e4f0dfc7fdbd1eeb61424bba55317eb35abd90a6fefb |
| generate-text.test-d.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-1e8b230b95c0e3e63cd7a9a30941e37e90ebdea29160388e61f630cd6caddc9f |
| generate-text.test.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-c4bc9d494ab8444f838ae359a15500491da0f2ec440a7047519261098bdf8639 |
| generate-text.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-d56ad94c7c3802f6ed5388ec6735018d179fa70735a40c8c79def79e5927d946 |
| index.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-f19b4ebbb843ff99163d0fe9355dcda955f7c1866b3094c9f0ce6ee20f443204 |
| tool-caller-configuration.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-9d2896bb2242bda09c842d0549a5f25cb1df83fc6b4e3e98ea0998b696de0ad5 |
| index.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-f0fa1410e0d7c9e14beb4ee4a3414a86dc8402e8a89c53a78c7620f2c9b0caac |
| code-execution_20250825.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-6fd70d1fc613c168592c6747c4cdf700fb9a69a808bcb6f763ac254ddd0f7535 |
| code-execution_20260120.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-0ca1866e5a8f5d014272b2b3cd2fbdd6d246cdcaba9021b7821d2ec3969ad35f |
| README.md | https://redirect.github.com/vercel/ai/commit/b192878#diff-9e912c29f9886947951924f9ce510f354ea1e5b2e0fbdf40a22b9df4d69c9486 |
| code-mode-tool.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-241fd6f1b4c3ba3db917e44c73b08acc6c2d2feaa44c6bd6d8cc9c40cf11dbc5 |
| index.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-85bfd23286a0d5b4ab23041eaeb4b179aeb2a948dee379308869c3ea5c07b911 |
| tool-invocation.test.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-83e2a7fdca4ba8ef4f2117d385c542afeb6fc61825b80f33577afda997e46ef5 |
| programmatic-tool-calling.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-d62cb5977ee9a2e909a9d86133146fb1944c46de28cdc699be49dacb4fa2694c |
| index.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-6b1d6370dabe08377949ccddd4360a9dccd9b70a1c4d2a9412a55494a4f1fb42 |
| tool-caller.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-ef75ae2c5872918603178946d7d01210da41874f3b3600ef95f7d274f9f0e9e1 |
| .changeset/quick-callers-route.md | https://redirect.github.com/vercel/ai/commit/b192878#diff-dc86488a86daf69b5574eb40fbc69a329105eae237d2124ba20a7a232aded5b6 |
| content/docs/03-ai-sdk-core/18-code-mode.mdx | https://redirect.github.com/vercel/ai/commit/b192878#diff-aec1b29a4b7d4a535b0df1d685ebade7ceabd833c93ac3538d626a73bce5b6d0 |
| content/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx | https://redirect.github.com/vercel/ai/commit/b192878#diff-e8bc910a48f7543dfff8bd7c953b13f9788e41443be7917f0b2843d71e3ecfc0 |
| examples/ai-functions/src/generate-text/code-mode/code-mode-with-openai-programmatic.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-f8af6ad79687d22b3d1639e8a5b63b7fef44daa660d049763659ad94b4dc393d |
| examples/ai-functions/src/generate-text/code-mode/code-mode.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-06dc26a97805ddbde578e4f0dfc7fdbd1eeb61424bba55317eb35abd90a6fefb |
| packages/ai/src/generate-text/generate-text.test-d.ts | https://redirect.github.com/vercel/ai/commit/b192878#diff-1e8b230b95c0e3e63cd7a9a30941e37e90ebdea29160388e61f630cd6caddc9f |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |